diff options
author | Jose Pedro Magalhaes <jpm@cs.uu.nl> | 2012-01-04 12:39:03 +0100 |
---|---|---|
committer | Jose Pedro Magalhaes <jpm@cs.uu.nl> | 2012-01-04 15:20:46 +0100 |
commit | cf655bc9c7ef7e647d25bb5f0719d00e14e2d6ee (patch) | |
tree | 2b2e86766432248e7b2ea0b247dc1f7ee2d5d21a | |
parent | 3fc68b5c356b39b2b52a86d953367d0021c13262 (diff) | |
download | haskell-cf655bc9c7ef7e647d25bb5f0719d00e14e2d6ee.tar.gz |
Restore printing of Rep type family instance with -ddump-deriving
-rw-r--r-- | compiler/typecheck/TcDeriv.lhs | 10 |
1 files changed, 7 insertions, 3 deletions
diff --git a/compiler/typecheck/TcDeriv.lhs b/compiler/typecheck/TcDeriv.lhs index 480aa12fea..ba77be5f4d 100644 --- a/compiler/typecheck/TcDeriv.lhs +++ b/compiler/typecheck/TcDeriv.lhs @@ -347,7 +347,7 @@ tcDeriving tycl_decls inst_decls deriv_decls -> Bag TyCon -- ^ Empty data constructors -> Bag FamInst -- ^ Rep type family instances -> SDoc - ddump_deriving inst_infos extra_binds repMetaTys repTyCons + ddump_deriving inst_infos extra_binds repMetaTys repFamInsts = hang (ptext (sLit "Derived instances:")) 2 (vcat (map (\i -> pprInstInfoDetails i $$ text "") (bagToList inst_infos)) $$ ppr extra_binds) @@ -355,10 +355,14 @@ tcDeriving tycl_decls inst_decls deriv_decls hangP "Generated datatypes for meta-information:" (vcat (map ppr (bagToList repMetaTys))) $$ hangP "Representation types:" - (vcat (map ppr (bagToList repTyCons)))) - + (vcat (map pprRepTy (bagToList repFamInsts)))) + hangP s x = text "" $$ hang (ptext (sLit s)) 2 x +-- Prints the representable type family instance +pprRepTy :: FamInst -> SDoc +pprRepTy fi + = pprFamInstHdr fi <+> ptext (sLit "=") <+> ppr (coAxiomRHS (famInstAxiom fi)) renameDeriv :: Bool -> [InstInfo RdrName] |