From e3f12103697e5eb9caada06134ba9aba01333928 Mon Sep 17 00:00:00 2001 From: aarne Date: Tue, 19 Jun 2007 18:12:35 +0000 Subject: extended functor syntax --- src/GF/Source/PrintGF.hs | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) (limited to 'src/GF/Source/PrintGF.hs') diff --git a/src/GF/Source/PrintGF.hs b/src/GF/Source/PrintGF.hs index 71bfe4dd6..ed45d39c4 100644 --- a/src/GF/Source/PrintGF.hs +++ b/src/GF/Source/PrintGF.hs @@ -144,13 +144,15 @@ instance Print ModType where instance Print ModBody where prt i e = case e of + MNoBody includeds -> prPrec i 0 (concatD [prt 0 includeds]) + MWithBody included opens0 opens topdefs -> prPrec i 0 (concatD [prt 0 included , doc (showString "with") , prt 0 opens0 , doc (showString "**") , prt 0 opens , doc (showString "{") , prt 0 topdefs , doc (showString "}")]) + MWithEBody includeds included opens0 opens topdefs -> prPrec i 0 (concatD [prt 0 includeds , doc (showString "**") , prt 0 included , doc (showString "with") , prt 0 opens0 , doc (showString "**") , prt 0 opens , doc (showString "{") , prt 0 topdefs , doc (showString "}")]) MBody extend opens topdefs -> prPrec i 0 (concatD [prt 0 extend , prt 0 opens , doc (showString "{") , prt 0 topdefs , doc (showString "}")]) - MWith id opens -> prPrec i 0 (concatD [prt 0 id , doc (showString "with") , prt 0 opens]) - MWithE includeds id opens -> prPrec i 0 (concatD [prt 0 includeds , doc (showString "**") , prt 0 id , doc (showString "with") , prt 0 opens]) + MWith included opens -> prPrec i 0 (concatD [prt 0 included , doc (showString "with") , prt 0 opens]) + MWithE includeds included opens -> prPrec i 0 (concatD [prt 0 includeds , doc (showString "**") , prt 0 included , doc (showString "with") , prt 0 opens]) MReuse id -> prPrec i 0 (concatD [doc (showString "reuse") , prt 0 id]) MUnion includeds -> prPrec i 0 (concatD [doc (showString "union") , prt 0 includeds]) - instance Print Extend where prt i e = case e of Ext includeds -> prPrec i 0 (concatD [prt 0 includeds , doc (showString "**")]) -- cgit v1.2.3