aboutsummaryrefslogtreecommitdiff
path: root/haddock-api
diff options
context:
space:
mode:
authorŁukasz Hanuszczak <lukasz.hanuszczak@gmail.com>2015-07-02 12:32:59 +0200
committerŁukasz Hanuszczak <lukasz.hanuszczak@gmail.com>2015-07-02 12:32:59 +0200
commit0d0550cdcf3fa7ceff88e2572f7ffb341b9f760d (patch)
treef7eae8f011a34ccf7c1eb14ea8ba3a3e5ab94606 /haddock-api
parent8071c27826d60eec1cb20f00f9767c32366defac (diff)
Fix crash happening when hyperlinking type family declarations.
Diffstat (limited to 'haddock-api')
-rw-r--r--haddock-api/src/Haddock/Backends/Hyperlinker/Ast.hs1
1 files changed, 1 insertions, 0 deletions
diff --git a/haddock-api/src/Haddock/Backends/Hyperlinker/Ast.hs b/haddock-api/src/Haddock/Backends/Hyperlinker/Ast.hs
index decb1206..c12ac35a 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))