aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCamil Staps2015-10-24 00:19:00 +0200
committerCamil Staps2015-10-24 00:19:00 +0200
commit667e32825c62ca48514afd0b29e1d5ba9d924978 (patch)
treea1c4a5c424101b99561e96ad1ce567d12b0b9605
parentAdhere to Clean library standards, i.e. don't import too much (diff)
Bugfixes in show functions (parentheses)
-rw-r--r--Logic.icl3
1 files changed, 2 insertions, 1 deletions
diff --git a/Logic.icl b/Logic.icl
index c678248..03cbf1a 100644
--- a/Logic.icl
+++ b/Logic.icl
@@ -116,6 +116,7 @@ instance show Expr
where
show opt (B b) = show opt b
show opt (Atom a) = show opt a
+ show opt (App1 op (App2 x y z)) = show opt op +++ "(" +++ show opt (App2 x y z) +++ ")"
show opt (App1 op e) = show opt op +++ show opt e
show opt (App2 e1 op e2) = if needs_l "(" "" +++
show opt e1 +++
@@ -214,8 +215,8 @@ binds_stronger _ And = False // And is left-associative
binds_stronger And _ = True
binds_stronger Or _ = True // The rest is right-associative
binds_stronger _ Or = False
-binds_stronger Impl _ = True
binds_stronger _ Impl = False
+binds_stronger Impl _ = True
binds_stronger Equiv Equiv = True
all_atoms :: Expr -> [AtomName]