aboutsummaryrefslogtreecommitdiff
path: root/haddock-api/src/Haddock/Interface
diff options
context:
space:
mode:
authorBen Gamari <ben@smart-cactus.org>2016-05-22 12:32:02 +0200
committerBen Gamari <ben@smart-cactus.org>2016-05-22 12:43:59 +0200
commitc03dad1c5d4ab7c44234d145ba9c13f17a918201 (patch)
tree1d14b6595fe9c5434ffaf3618f71095b4c435555 /haddock-api/src/Haddock/Interface
parentebd41f6eb98fdbd43e25fdd574271de9159cde11 (diff)
Create: Better debug output
For tracking down #505
Diffstat (limited to 'haddock-api/src/Haddock/Interface')
-rw-r--r--haddock-api/src/Haddock/Interface/Create.hs5
1 files changed, 4 insertions, 1 deletions
diff --git a/haddock-api/src/Haddock/Interface/Create.hs b/haddock-api/src/Haddock/Interface/Create.hs
index a351c0dc..8d561d68 100644
--- a/haddock-api/src/Haddock/Interface/Create.hs
+++ b/haddock-api/src/Haddock/Interface/Create.hs
@@ -789,7 +789,10 @@ extractDecl name mdl decl
[s0] -> let (n, tyvar_names) = (tcdName d, tyClDeclTyVars d)
L pos sig = addClassContext n tyvar_names s0
in L pos (SigD sig)
- _ -> error "internal: extractDecl (ClassDecl)"
+ _ -> O.pprPanic "extractDecl" (O.text "Ambiguous decl for" O.<+> O.ppr name O.<+> O.text "in class:"
+ O.$$ O.nest 4 (O.ppr d)
+ O.$$ O.text "Matches:"
+ O.$$ O.nest 4 (O.ppr matches))
TyClD d@DataDecl {} ->
let (n, tyvar_tys) = (tcdName d, lHsQTyVarsToTypes (tyClDeclTyVars d))
in SigD <$> extractRecSel name mdl n tyvar_tys (dd_cons (tcdDataDefn d))