diff options
-rwxr-xr-x[-rw-r--r--] | compiler/typecheck/TcDeriv.lhs | 16 |
1 files changed, 4 insertions, 12 deletions
diff --git a/compiler/typecheck/TcDeriv.lhs b/compiler/typecheck/TcDeriv.lhs index 1a7db7abf5..2c714efd52 100644..100755 --- a/compiler/typecheck/TcDeriv.lhs +++ b/compiler/typecheck/TcDeriv.lhs @@ -326,11 +326,7 @@ tcDeriving tycl_decls inst_decls deriv_decls ; dflags <- getDOpts ; liftIO (dumpIfSet_dyn dflags Opt_D_dump_deriv "Derived instances" - (ddump_deriving inst_info rn_binds newTyCons famInsts extraInstances)) -{- - ; when (not (null inst_info)) $ - dumpDerivingInfo (ddump_deriving inst_info rn_binds) --} + (ddump_deriving inst_info rn_binds newTyCons famInsts)) ; let all_tycons = map ATyCon (bagToList newTyCons) ; gbl_env <- tcExtendGlobalEnv all_tycons $ @@ -343,22 +339,18 @@ tcDeriving tycl_decls inst_decls deriv_decls ddump_deriving :: Bag (InstInfo Name) -> HsValBinds Name -> Bag TyCon -- ^ Empty data constructors -> Bag TyCon -- ^ Rep type family instances - -> Bag (InstInfo RdrName) - -- ^ Instances for the repMetaTys -> SDoc - ddump_deriving inst_infos extra_binds repMetaTys repTyCons metaInsts + ddump_deriving inst_infos extra_binds repMetaTys repTyCons = hang (ptext (sLit "Derived instances:")) 2 (vcat (map (\i -> pprInstInfoDetails i $$ text "") (bagToList inst_infos)) $$ ppr extra_binds) $$ hangP "Generic representation:" ( hangP "Generated datatypes for meta-information:" (vcat (map ppr (bagToList repMetaTys))) - -- The Outputable instance for TyCon unfortunately only prints the name... $$ hangP "Representation types:" - (vcat (map ppr (bagToList repTyCons))) - $$ hangP "Meta-information instances:" - (vcat (map pprInstInfoDetails (bagToList metaInsts)))) + (vcat (map pprTyFamInst (bagToList repTyCons)))) + pprTyFamInst t = ppr t <+> text "=" <+> ppr (synTyConType t) hangP s x = text "" $$ hang (ptext (sLit s)) 2 x |