import DataCon
import Type
import Class
-import Pair
import TcType ( orphNamesOfDFunHead )
import Inst ( tcGetInstEnvs )
import Data.List ( sortBy )
= vcat [ text "TYPE CONSTRUCTORS"
, nest 2 (ppr_tydecls tycons)
, text "COERCION AXIOMS"
- , nest 2 (ppr_axioms (typeEnvCoAxioms type_env)) ]
+ , nest 2 (vcat (map pprCoAxiom (typeEnvCoAxioms type_env))) ]
where
fi_tycons = map famInstTyCon fam_insts
tycons = [tycon | tycon <- typeEnvTyCons type_env, want_tycon tycon]
ppr_tycon tycon = ppr (tyThingToIfaceDecl (ATyCon tycon))
where
-ppr_axioms :: [CoAxiom] -> SDoc
-ppr_axioms axs
- = vcat (map ppr_ax axs)
- where
- ppr_ax ax = sep [ ptext (sLit "coercion") <+> ppr ax <+> ppr (co_ax_tvs ax)
- , nest 2 (dcolon <+> pprEqPred
- (Pair (co_ax_lhs ax) (co_ax_rhs ax))) ]
-
ppr_rules :: [CoreRule] -> SDoc
ppr_rules [] = empty
ppr_rules rs = vcat [ptext (sLit "{-# RULES"),