From 903ae349b208e041a4dc23de8f70100580349891 Mon Sep 17 00:00:00 2001 From: VegOwOtenks Date: Fri, 18 Oct 2024 18:10:54 +0200 Subject: [PATCH] Operator table cleanup, type signatures (no warnings!) --- src/Lib.hs | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/src/Lib.hs b/src/Lib.hs index 30242ee..9eaeb94 100644 --- a/src/Lib.hs +++ b/src/Lib.hs @@ -50,6 +50,11 @@ def = emptyDef{ commentStart = "" , reservedNames = ["true", "false"] } +m_parens :: ParsecT String u Identity a -> ParsecT String u Identity a +m_identifier :: ParsecT String u Identity String +m_reservedOp :: String -> ParsecT String u Identity () +m_reserved :: String -> ParsecT String u Identity () +m_whiteSpace :: ParsecT String u Identity () TokenParser{ parens = m_parens , identifier = m_identifier , reservedOp = m_reservedOp @@ -74,10 +79,8 @@ table = [ Infix (m_reservedOp "->" >> return (Binary LogicalImplication)) AssocLeft ], [ + Infix (m_reservedOp "=" >> return (Binary LogicalEquality)) AssocLeft, Infix (m_reservedOp "<-->" >> return (Binary LogicalEquality)) AssocLeft - ], - [ - Infix (m_reservedOp "=" >> return (Binary LogicalEquality)) AssocLeft ] ]