Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in / Register
Toggle navigation
Menu
Open sidebar
Glasgow Haskell Compiler
GHC
Commits
cf655bc9
Commit
cf655bc9
authored
Jan 04, 2012
by
dreixel
Browse files
Restore printing of Rep type family instance with -ddump-deriving
parent
3fc68b5c
Changes
1
Hide whitespace changes
Inline
Side-by-side
compiler/typecheck/TcDeriv.lhs
View file @
cf655bc9
...
...
@@ -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 rep
TyCon
s
ddump_deriving inst_infos extra_binds repMetaTys rep
FamInst
s
= 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 rep
TyCon
s))))
(vcat (map ppr
RepTy
(bagToList rep
FamInst
s))))
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]
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment