diff options
| author | aarne <aarne@cs.chalmers.se> | 2007-06-19 18:12:35 +0000 |
|---|---|---|
| committer | aarne <aarne@cs.chalmers.se> | 2007-06-19 18:12:35 +0000 |
| commit | e3f12103697e5eb9caada06134ba9aba01333928 (patch) | |
| tree | 17a7f0cf5efbe215a23d5837d11a6981954c39da /src/GF/Source/PrintGF.hs | |
| parent | f30fa0b4d15ec256f55e2c453fc3d7c42de9b3bf (diff) | |
extended functor syntax
Diffstat (limited to 'src/GF/Source/PrintGF.hs')
| -rw-r--r-- | src/GF/Source/PrintGF.hs | 8 |
1 files changed, 5 insertions, 3 deletions
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 "**")]) |
