From 0166b27ee45f24fb60d79498a5d15b4f316191f3 Mon Sep 17 00:00:00 2001 From: aarne Date: Fri, 27 Feb 2004 07:43:52 +0000 Subject: Started with unions. --- src/GF/Source/PrintGF.hs | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) (limited to 'src/GF/Source/PrintGF.hs') diff --git a/src/GF/Source/PrintGF.hs b/src/GF/Source/PrintGF.hs index aa5909e33..b06e09a1b 100644 --- a/src/GF/Source/PrintGF.hs +++ b/src/GF/Source/PrintGF.hs @@ -134,7 +134,7 @@ instance Print ModBody where MBody extend opens topdefs -> prPrec i 0 (concat [prt 0 extend , prt 0 opens , ["{"] , prt 0 topdefs , ["}"]]) MWith id opens -> prPrec i 0 (concat [prt 0 id , ["with"] , prt 0 opens]) MReuse id -> prPrec i 0 (concat [["reuse"] , prt 0 id]) - + MUnion includeds -> prPrec i 0 (concat [["union"] , prt 0 includeds]) instance Print Extend where prt i e = case e of @@ -171,6 +171,15 @@ instance Print QualOpen where QOIncompl -> prPrec i 0 (concat [["incomplete"]]) QOInterface -> prPrec i 0 (concat [["interface"]]) +instance Print Included where + prt i e = case e of + IAll id -> prPrec i 0 (concat [prt 0 id]) + ISome id ids -> prPrec i 0 (concat [prt 0 id , ["["] , prt 0 ids , ["]"]]) + + prtList es = case es of + [] -> (concat []) + [x] -> (concat [prt 0 x]) + x:xs -> (concat [prt 0 x , [","] , prt 0 xs]) instance Print Def where prt i e = case e of -- cgit v1.2.3