From 8e8143b7a9b07e2b85901743cf13048ae0873707 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Anders=20M=C3=B6rtberg?= Date: Mon, 20 Apr 2015 23:22:19 +0200 Subject: [PATCH] Fix printing of VPi --- CTT.hs | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/CTT.hs b/CTT.hs index 0d5bf49..b9dfb0b 100644 --- a/CTT.hs +++ b/CTT.hs @@ -380,9 +380,9 @@ showVal v = case v of VCon c us -> text c <+> showVals us VPCon c a us phis -> text c <+> braces (showVal a) <+> showVals us <+> (hsep $ map ((char '@' <+>) . showFormula) phis) - VPi a l@(VLam x t b) | "_" `isPrefixOf` x -> showVal1 a <+> text "->" - <+> showVal1 b - | otherwise -> showVal l + VPi a l@(VLam x t b) + | "_" `isPrefixOf` x -> showVal1 a <+> text "->" <+> showVal1 b + | otherwise -> parens (text x <+> colon <+> showVal t) <+> text "->" <+> showVal b VPi a b -> text "Pi" <+> showVals [a,b] VPair u v -> parens (showVal u <> comma <> showVal v) VSigma u v -> text "Sigma" <+> showVals [u,v] -- 2.34.1