File tree Expand file tree Collapse file tree 1 file changed +14
-5
lines changed
Expand file tree Collapse file tree 1 file changed +14
-5
lines changed Original file line number Diff line number Diff line change @@ -83,13 +83,22 @@ isLiteral (PNot f) = isLiteral f
8383isLiteral _ = False
8484
8585-- | UTF-8 characters for printing propositional operators.
86+ -- instance Show a => Show (PropositionalFormula a) where
87+ -- show PTrue = "⊤"
88+ -- show PFalse = "⊥"
89+ -- show (PVariable v) = show v
90+ -- show (PNot p) = "¬"++show p
91+ -- show (PAnd cs) = "("++(intercalate " ∧ " $ map show cs)++")"
92+ -- show (POr cs) = "("++(intercalate " ∨ " $ map show cs)++")"
93+
94+ -- | ASCII characters for printing propositional operators.
8695instance Show a => Show (PropositionalFormula a ) where
87- show PTrue = " ⊤ "
88- show PFalse = " ⊥ "
96+ show PTrue = " true "
97+ show PFalse = " false "
8998 show (PVariable v) = show v
90- show (PNot p) = " ¬ " ++ show p
91- show (PAnd cs) = " (" ++ (intercalate " ∧ " $ map show cs)++ " )"
92- show (POr cs) = " (" ++ (intercalate " ∨ " $ map show cs)++ " )"
99+ show (PNot p) = " ! " ++ show p
100+ show (PAnd cs) = " (" ++ (intercalate " & " $ map show cs)++ " )"
101+ show (POr cs) = " (" ++ (intercalate " | " $ map show cs)++ " )"
93102
94103-- -- | This visualisation is for debugging as it shows the exact expression tree.
95104-- instance Show a => Show (PropositionalFormula a) where
You can’t perform that action at this time.
0 commit comments