From: Anders Date: Fri, 20 Mar 2015 09:30:44 +0000 (+0100) Subject: Fix printing of systems X-Git-Url: https://git.ak3n.com/?a=commitdiff_plain;h=cf8cc38b3f4e19d2433e2fba9351e9aa2ce8f740;p=cubicaltt.git Fix printing of systems --- diff --git a/CTT.hs b/CTT.hs index 3269bc2..0a0ee1f 100644 --- a/CTT.hs +++ b/CTT.hs @@ -215,7 +215,7 @@ showTer v = case v of Undef _ -> text "undefined" IdP e0 e1 e2 -> text "IdP" <+> showTers [e0,e1,e2] Path i e -> char '<' <> text (show i) <> char '>' <+> showTer e - AppFormula e phi -> showTer1 e <> char '@' <> text (show phi) + AppFormula e phi -> showTer1 e <+> char '@' <+> text (show phi) Comp e0 e1 es -> text "comp" <+> showTers [e0,e1] <+> text (showSystem es) Trans e0 e1 -> text "transport" <+> showTers [e0,e1] diff --git a/Connections.hs b/Connections.hs index 9d6fea1..c36d5c5 100644 --- a/Connections.hs +++ b/Connections.hs @@ -145,7 +145,7 @@ instance Show Formula where show (a :/\: b) = show1 a ++ " /\\ " ++ show1 b where show1 v@(a :\/: b) = "(" ++ show v ++ ")" show1 a = show a - + arbFormula :: [Name] -> Int -> Gen Formula arbFormula names s = frequency [ (1, Dir <$> arbitrary) @@ -335,7 +335,7 @@ type System a = Map Face a showSystem :: Show a => System a -> String showSystem ts = - "[ " ++ concat (intersperse ", " [ showFace alpha ++ " |-> " ++ show u + "[ " ++ concat (intersperse ", " [ showFace alpha ++ " -> " ++ show u | (alpha,u) <- Map.toList ts ]) ++ " ]" insertSystem :: Face -> a -> System a -> System a