diff options
| author | bjorn <bjorn@bringert.net> | 2008-09-30 12:02:58 +0000 |
|---|---|---|
| committer | bjorn <bjorn@bringert.net> | 2008-09-30 12:02:58 +0000 |
| commit | 203430ae6d440e7239b0c289df0380835427fba7 (patch) | |
| tree | bf58f8fcddb256b700f5f13a5c8666a660dfa005 /src/GF/Compile | |
| parent | 446aa1b5db35402dbdd0821eec4ea1bbbed7d0f9 (diff) | |
Use parantheses for precedence in pgf-pretty lincats.
Diffstat (limited to 'src/GF/Compile')
| -rw-r--r-- | src/GF/Compile/PGFPretty.hs | 8 |
1 files 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 |
