diff --git a/src/Lib.hs b/src/Lib.hs index 9eaeb94..87a24da 100644 --- a/src/Lib.hs +++ b/src/Lib.hs @@ -70,10 +70,10 @@ table = [ Prefix (m_reservedOp "~" >> return (Unary LogicalNot)) ], [ - Infix (m_reservedOp "&" >> return (Binary LogicalAnd)) AssocLeft + Infix (m_reservedOp "|" >> return (Binary LogicalOr)) AssocLeft ], [ - Infix (m_reservedOp "|" >> return (Binary LogicalOr)) AssocLeft + Infix (m_reservedOp "&" >> return (Binary LogicalAnd)) AssocLeft ], [ Infix (m_reservedOp "->" >> return (Binary LogicalImplication)) AssocLeft @@ -109,6 +109,6 @@ evaluate vs (Binary LogicalEquality l r) = evaluate vs l == evaluate vs r evaluate vs (Binary LogicalImplication l r) = implication (evaluate vs l) (evaluate vs r) where implication :: Bool -> Bool -> Bool - implication False True = False + implication True False = False implication _ _ = True evaluate vs (Variable name) = maybe False id (Map.lookup name vs)