-ptdef (Newtype qtcon tbinds tyopt ) =
- text "%newtype" <+> pqname qtcon <+> (hsep (map ptbind tbinds)) <+>
- (case tyopt of
- Just ty -> char '=' <+> pty ty
- Nothing -> empty)
+ptdef (Newtype qtcon tbinds (coercion,k) tyopt) =
+ text "%newtype" <+> pqname qtcon <+> (hsep (map ptbind tbinds))
+ $$ indent (axiomclause $$ repclause)
+ where axiomclause = char '^' <+> parens (pqname coercion <+> text "::"
+ <+> pkind k)
+ repclause = case tyopt of
+ Just ty -> char '=' <+> pty ty
+ Nothing -> empty