aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorŁukasz Hanuszczak <lukasz.hanuszczak@gmail.com>2015-06-29 23:00:54 +0200
committerŁukasz Hanuszczak <lukasz.hanuszczak@gmail.com>2015-06-30 22:37:50 +0200
commitd6cfd266b30066a5452514b26e50b740104a982b (patch)
treead989b50c6c38285ab009a8a6c11a087b6c05ffb
parent671e7dc60266d1e0fdabd34956719961c1333fb3 (diff)
Add support for hyperlinking constructor names in patters.
-rw-r--r--haddock-api/src/Haddock/Backends/Hyperlinker/Ast.hs2
1 files changed, 2 insertions, 0 deletions
diff --git a/haddock-api/src/Haddock/Backends/Hyperlinker/Ast.hs b/haddock-api/src/Haddock/Backends/Hyperlinker/Ast.hs
index 5efcd2ed..fd3f2f1e 100644
--- a/haddock-api/src/Haddock/Backends/Hyperlinker/Ast.hs
+++ b/haddock-api/src/Haddock/Backends/Hyperlinker/Ast.hs
@@ -102,6 +102,8 @@ binds =
pat term = case cast term of
(Just (GHC.L sspan (GHC.VarPat name))) ->
pure (sspan, RtkBind name)
+ (Just (GHC.L _ (GHC.ConPatIn (GHC.L sspan name) _))) ->
+ pure (sspan, RtkVar name)
_ -> empty
-- | Obtain details map for top-level declarations.