[commit: haddock] master: Add support for hyperlinking constructor names in patters. (d6cfd26)

git at git.haskell.org git at git.haskell.org
Wed Jul 8 08:41:33 UTC 2015


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

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

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

commit d6cfd266b30066a5452514b26e50b740104a982b
Author: Łukasz Hanuszczak <lukasz.hanuszczak at gmail.com>
Date:   Mon Jun 29 23:00:54 2015 +0200

    Add support for hyperlinking constructor names in patters.


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

d6cfd266b30066a5452514b26e50b740104a982b
 haddock-api/src/Haddock/Backends/Hyperlinker/Ast.hs | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/haddock-api/src/Haddock/Backends/Hyperlinker/Ast.hs b/haddock-api/src/Haddock/Backends/Hyperlinker/Ast.hs
index 5efcd2e..fd3f2f1 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.



More information about the ghc-commits mailing list