From b91ee2f4f0869d1c1076813019ce858c53738042 Mon Sep 17 00:00:00 2001 From: Ɓukasz Hanuszczak Date: Wed, 1 Jul 2015 18:32:19 +0200 Subject: Add support for hyperlinking synonyms in patterns. --- haddock-api/src/Haddock/Backends/Hyperlinker/Ast.hs | 2 ++ 1 file changed, 2 insertions(+) (limited to 'haddock-api/src/Haddock/Backends/Hyperlinker/Ast.hs') diff --git a/haddock-api/src/Haddock/Backends/Hyperlinker/Ast.hs b/haddock-api/src/Haddock/Backends/Hyperlinker/Ast.hs index c41b5e5f..8777e26d 100644 --- a/haddock-api/src/Haddock/Backends/Hyperlinker/Ast.hs +++ b/haddock-api/src/Haddock/Backends/Hyperlinker/Ast.hs @@ -110,6 +110,8 @@ binds = pure (sspan, RtkBind name) (Just (GHC.L _ (GHC.ConPatIn (GHC.L sspan name) recs))) -> [(sspan, RtkVar name)] ++ everything (<|>) rec recs + (Just (GHC.L _ (GHC.AsPat (GHC.L sspan name) _))) -> + pure (sspan, RtkBind name) _ -> empty rec term = case cast term of (Just (GHC.HsRecField (GHC.L sspan name) (_ :: GHC.LPat GHC.Name) _)) -> -- cgit v1.2.3