[commit: haddock] 2.17.3.1-spanfix, alexbiehl-patch-1, ghc-8.0, ghc-head, ghc-head1, headdock-library-1.4.5, ie_avails, master, pr-filter-maps, pr/cabal-desc, travis, v2.17, v2.17.3, v2.18, wip/T14529, wip/new-tree-one-param, wip/rae, wip/remove-frames, wip/remove-frames1, wip/revert-ttg-2017-11-20, wip/ttg-2017-10-13, wip/ttg-2017-10-31, wip/ttg-2017-11-06, wip/ttg2-2017-11-10, wip/ttg3-2017-11-12, wip/ttg4-constraints-2017-11-13, wip/ttg6-unrevert-2017-11-22: Create: Better debug output (c03dad1)

git at git.haskell.org git at git.haskell.org
Tue Nov 28 11:46:35 UTC 2017


Repository : ssh://git@git.haskell.org/haddock

On branches: 2.17.3.1-spanfix,alexbiehl-patch-1,ghc-8.0,ghc-head,ghc-head1,headdock-library-1.4.5,ie_avails,master,pr-filter-maps,pr/cabal-desc,travis,v2.17,v2.17.3,v2.18,wip/T14529,wip/new-tree-one-param,wip/rae,wip/remove-frames,wip/remove-frames1,wip/revert-ttg-2017-11-20,wip/ttg-2017-10-13,wip/ttg-2017-10-31,wip/ttg-2017-11-06,wip/ttg2-2017-11-10,wip/ttg3-2017-11-12,wip/ttg4-constraints-2017-11-13,wip/ttg6-unrevert-2017-11-22
Link       : http://git.haskell.org/haddock.git/commitdiff/c03dad1c5d4ab7c44234d145ba9c13f17a918201

>---------------------------------------------------------------

commit c03dad1c5d4ab7c44234d145ba9c13f17a918201
Author: Ben Gamari <ben at smart-cactus.org>
Date:   Sun May 22 12:32:02 2016 +0200

    Create: Better debug output
    
    For tracking down #505


>---------------------------------------------------------------

c03dad1c5d4ab7c44234d145ba9c13f17a918201
 haddock-api/src/Haddock/Interface/Create.hs | 5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)

diff --git a/haddock-api/src/Haddock/Interface/Create.hs b/haddock-api/src/Haddock/Interface/Create.hs
index a351c0d..8d561d6 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 at DataDecl {} ->
         let (n, tyvar_tys) = (tcdName d, lHsQTyVarsToTypes (tyClDeclTyVars d))
         in SigD <$> extractRecSel name mdl n tyvar_tys (dd_cons (tcdDataDefn d))



More information about the ghc-commits mailing list