diff --git a/src/GF/Grammar/Printer.hs b/src/GF/Grammar/Printer.hs index a83f0241d..cc95b2816 100644 --- a/src/GF/Grammar/Printer.hs +++ b/src/GF/Grammar/Printer.hs @@ -16,6 +16,7 @@ module GF.Grammar.Printer import GF.Infra.Ident import GF.Infra.Modules +import GF.Infra.Option import GF.Grammar.Grammar import GF.Data.Operations import Text.PrettyPrint @@ -28,7 +29,7 @@ ppModule (mn, ModInfo mtype mstat opts exts with opens jments _) = (let defs = tree2list jments in if null defs then hdr - else hdr <+> lbrace $$ nest 2 (vcat (map ppJudgement defs)) $$ rbrace) + else hdr <+> lbrace $$ nest 2 (ppOptions opts $$ vcat (map ppJudgement defs)) $$ rbrace) where hdr = complModDoc <+> modTypeDoc <+> equals <+> hsep (intersperse (text "**") $ @@ -59,6 +60,10 @@ ppModule (mn, ModInfo mtype mstat opts exts with opens jments _) = ppWith (id,ext,opens) = ppExtends (id,ext) <+> text "with" <+> commaPunct ppOpenSpec opens +ppOptions opts = + text "flags" $$ + nest 2 (vcat [text option <+> equals <+> text (show value) <+> semi | (option,value) <- optionsGFO opts]) + ppJudgement (id, AbsCat pcont pconstrs) = text "cat" <+> ppIdent id <+> (case pcont of