From 667e32825c62ca48514afd0b29e1d5ba9d924978 Mon Sep 17 00:00:00 2001 From: Camil Staps Date: Sat, 24 Oct 2015 00:19:00 +0200 Subject: Bugfixes in show functions (parentheses) --- Logic.icl | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'Logic.icl') 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] -- cgit v1.2.3