1
0
forked from GitHub/gf-core

GF.Grammar.Printer: print expressions with lincat and lin

This commit is contained in:
krasimir
2010-06-21 15:23:49 +00:00
parent 8433afdac9
commit 7fa1963cc4

View File

@@ -182,6 +182,8 @@ ppTerm q d (R xs) = braces (fsep (punctuate semi [ppLabel l <+>
ppTerm q d (RecType xs)= braces (fsep (punctuate semi [ppLabel l <+> colon <+> ppTerm q 0 t | (l,t) <- xs]))
ppTerm q d (Typed e t) = char '<' <> ppTerm q 0 e <+> colon <+> ppTerm q 0 t <> char '>'
ppTerm q d (ImplArg e) = braces (ppTerm q 0 e)
ppTerm q d (ELincat cat t) = prec d 4 (text "lincat" <+> ppIdent cat <+> ppTerm q 5 t)
ppTerm q d (ELin cat t) = prec d 4 (text "lin" <+> ppIdent cat <+> ppTerm q 5 t)
ppEquation q (ps,e) = hcat (map (ppPatt q 2) ps) <+> text "->" <+> ppTerm q 0 e