[commit: haddock] master: Fix crash happening when hyperlinking type family declarations. (0d0550c)

git at git.haskell.org git at git.haskell.org
Wed Jul 8 08:42:27 UTC 2015


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

On branch  : master
Link       : http://git.haskell.org/haddock.git/commitdiff/0d0550cdcf3fa7ceff88e2572f7ffb341b9f760d

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

commit 0d0550cdcf3fa7ceff88e2572f7ffb341b9f760d
Author: Łukasz Hanuszczak <lukasz.hanuszczak at gmail.com>
Date:   Thu Jul 2 12:32:59 2015 +0200

    Fix crash happening when hyperlinking type family declarations.


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

0d0550cdcf3fa7ceff88e2572f7ffb341b9f760d
 haddock-api/src/Haddock/Backends/Hyperlinker/Ast.hs | 1 +
 1 file changed, 1 insertion(+)

diff --git a/haddock-api/src/Haddock/Backends/Hyperlinker/Ast.hs b/haddock-api/src/Haddock/Backends/Hyperlinker/Ast.hs
index decb120..c12ac35 100644
--- a/haddock-api/src/Haddock/Backends/Hyperlinker/Ast.hs
+++ b/haddock-api/src/Haddock/Backends/Hyperlinker/Ast.hs
@@ -135,6 +135,7 @@ decls (group, _, _, _) = concatMap ($ group)
     typ (GHC.L _ t) = case t of
         GHC.DataDecl name _ defn _ ->
             [decl name] ++ concatMap con (GHC.dd_cons defn)
+        GHC.FamDecl fam -> pure . decl $ GHC.fdLName fam
         _ -> pure . decl $ GHC.tcdLName t
     fun term = case cast term of
         (Just (GHC.FunBind (GHC.L sspan name) _ _ _ _ _ :: GHC.HsBind GHC.Name))



More information about the ghc-commits mailing list