From cec77015adfb904f10ab9eb33e1259b63717952d Mon Sep 17 00:00:00 2001 From: bjorn Date: Tue, 30 Sep 2008 12:02:58 +0000 Subject: [PATCH] Use parantheses for precedence in pgf-pretty lincats. --- src/GF/Compile/PGFPretty.hs | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/GF/Compile/PGFPretty.hs b/src/GF/Compile/PGFPretty.hs index a9b820c1e..a6f48beb2 100644 --- a/src/GF/Compile/PGFPretty.hs +++ b/src/GF/Compile/PGFPretty.hs @@ -39,11 +39,11 @@ prCnc abstr name c = prAll prLinCat (lincats c) $$ prAll prLin (lins (expand c)) where prLinCat :: CId -> Term -> Doc prLinCat c t | isLiteralCat c = empty - | otherwise = text "lincat" <+> text (prCId c) <+> text "=" <+> pr t + | otherwise = text "lincat" <+> text (prCId c) <+> text "=" <+> pr 0 t where - pr (R ts) = hsep (punctuate (text " *") (map pr ts)) - pr (S []) = text "Str" - pr (C n) = text "Int_" <> text (show (n+1)) + pr p (R ts) = prec p 1 (hsep (punctuate (text " *") (map (pr 1) ts))) + pr _ (S []) = text "Str" + pr _ (C n) = text "Int_" <> text (show (n+1)) prLin :: CId -> Term -> Doc prLin f t = text "lin" <+> text (prCId f) <+> text "=" <+> pr 0 t