X-Git-Url: http://git.megacz.com/?p=ghc-hetmet.git;a=blobdiff_plain;f=utils%2Fext-core%2FPrinter.hs;fp=utils%2Fext-core%2FPrinter.hs;h=4e424452c3e099653617bf097f27434367342224;hp=2649a0015a92ee5983267f40974761e438458529;hb=e4417dcd4679da9c6b18c02ff667199c572bed89;hpb=9f565a397c17568f725b25720a817326744777f0 diff --git a/utils/ext-core/Printer.hs b/utils/ext-core/Printer.hs index 2649a00..4e42445 100644 --- a/utils/ext-core/Printer.hs +++ b/utils/ext-core/Printer.hs @@ -66,14 +66,10 @@ ptdef (Data qtcon tbinds cdefs) = (text "%data" <+> pqname qtcon <+> (hsep (map ptbind tbinds)) <+> char '=') $$ indent (braces ((vcat (punctuate (char ';') (map pcdef cdefs))))) -ptdef (Newtype qtcon tbinds (coercion,cTbs,k) tyopt) = - text "%newtype" <+> pqname qtcon <+> (hsep (map ptbind tbinds)) - $$ indent (axiomclause $$ repclause) - where axiomclause = char '^' <+> parens (pqname coercion <+> - (hsep (map ptbind cTbs)) <+> - text "::" - <+> peqkind k) - repclause = case tyopt of +ptdef (Newtype qtcon coercion tbinds tyopt) = + text "%newtype" <+> pqname qtcon <+> pqname coercion + <+> (hsep (map ptbind tbinds)) $$ indent repclause + where repclause = case tyopt of Just ty -> char '=' <+> pty ty Nothing -> empty