Skip to content

Commit

Permalink
Output better debug infromation on internal error in extractDecl
Browse files Browse the repository at this point in the history
This will make investigation of haskell#979 easier
  • Loading branch information
watashi committed Dec 13, 2018
1 parent d66a17f commit c62ade2
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion haddock-api/src/Haddock/Interface/Create.hs
Original file line number Diff line number Diff line change
Expand Up @@ -1112,7 +1112,9 @@ extractDecl declMap name decl
in case matches of
[d0] -> extractDecl declMap name (noLoc . InstD noExt $ DataFamInstD noExt d0)
_ -> error "internal: extractDecl (ClsInstD)"
_ -> error "internal: extractDecl"
_ -> O.pprPanic "extractDecl" $
O.text "Unhandled decl for" O.<+> O.ppr name O.<> O.text ":"
O.$$ O.nest 4 (O.ppr decl)


extractPatternSyn :: Name -> Name -> [LHsType GhcRn] -> [LConDecl GhcRn] -> LSig GhcRn
Expand Down

0 comments on commit c62ade2

Please sign in to comment.