diff options
author | Zejun Wu <watashi@watashi.ws> | 2018-12-13 15:12:37 -0800 |
---|---|---|
committer | Alec Theriault <alec.theriault@gmail.com> | 2018-12-14 09:37:47 -0500 |
commit | 1380f7fa048ba26f79944452722dff0800b49038 (patch) | |
tree | 4ea0b6f8b7d72c020005223843103898c762bb5e /haddock-api/src/Haddock | |
parent | d66a17f3d7552ccd82b5b4b491013f9ac9498966 (diff) |
Output better debug infromation on internal error in extractDecl
This will make investigation of #979 easier
Diffstat (limited to 'haddock-api/src/Haddock')
-rw-r--r-- | haddock-api/src/Haddock/Interface/Create.hs | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/haddock-api/src/Haddock/Interface/Create.hs b/haddock-api/src/Haddock/Interface/Create.hs index ea50cba9..c72d5f38 100644 --- a/haddock-api/src/Haddock/Interface/Create.hs +++ b/haddock-api/src/Haddock/Interface/Create.hs @@ -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 |