[commit: haddock] wip/T13163: Changes to match #13163 in GHC (13cba81)

git at git.haskell.org git at git.haskell.org
Mon Nov 20 21:04:49 UTC 2017


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

On branch  : wip/T13163
Link       : http://git.haskell.org/haddock.git/commitdiff/13cba819b796a3044cb7eb168578962c205290bf

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

commit 13cba819b796a3044cb7eb168578962c205290bf
Author: Alan Zimmerman <alan.zimm at gmail.com>
Date:   Tue Jan 24 21:57:56 2017 +0200

    Changes to match #13163 in GHC


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

13cba819b796a3044cb7eb168578962c205290bf
 haddock-api/src/Haddock/Backends/Hyperlinker/Ast.hs | 8 ++++----
 haddock-api/src/Haddock/Interface/Create.hs         | 8 ++++----
 2 files changed, 8 insertions(+), 8 deletions(-)

diff --git a/haddock-api/src/Haddock/Backends/Hyperlinker/Ast.hs b/haddock-api/src/Haddock/Backends/Hyperlinker/Ast.hs
index aff61cf..b97f0ea 100644
--- a/haddock-api/src/Haddock/Backends/Hyperlinker/Ast.hs
+++ b/haddock-api/src/Haddock/Backends/Hyperlinker/Ast.hs
@@ -152,11 +152,11 @@ imports src@(_, imps, _, _) =
     everything (<|>) ie src ++ mapMaybe (imp . GHC.unLoc) imps
   where
     ie term = case cast term of
-        (Just (GHC.IEVar v)) -> pure $ var v
-        (Just (GHC.IEThingAbs t)) -> pure $ typ t
-        (Just (GHC.IEThingAll t)) -> pure $ typ t
+        (Just (GHC.IEVar v)) -> pure $ var $ GHC.ieLWrappedName v
+        (Just (GHC.IEThingAbs t)) -> pure $ typ $ GHC.ieLWrappedName t
+        (Just (GHC.IEThingAll t)) -> pure $ typ $ GHC.ieLWrappedName t
         (Just (GHC.IEThingWith t _ vs _fls)) ->
-          [typ t] ++ map var vs
+          [typ $ GHC.ieLWrappedName t] ++ map (var . GHC.ieLWrappedName) vs
         _ -> empty
     typ (GHC.L sspan name) = (sspan, RtkType name)
     var (GHC.L sspan name) = (sspan, RtkVar name)
diff --git a/haddock-api/src/Haddock/Interface/Create.hs b/haddock-api/src/Haddock/Interface/Create.hs
index 4e1a9b3..4a65fc2 100644
--- a/haddock-api/src/Haddock/Interface/Create.hs
+++ b/haddock-api/src/Haddock/Interface/Create.hs
@@ -511,10 +511,10 @@ mkExportItems
     Nothing -> fullModuleContents dflags warnings gre maps fixMap splices decls
     Just exports -> liftM concat $ mapM lookupExport exports
   where
-    lookupExport (IEVar (L _ x))         = declWith x
-    lookupExport (IEThingAbs (L _ t))    = declWith t
-    lookupExport (IEThingAll (L _ t))    = declWith t
-    lookupExport (IEThingWith (L _ t) _ _ _) = declWith t
+    lookupExport (IEVar (L _ x))         = declWith $ ieWrappedName x
+    lookupExport (IEThingAbs (L _ t))    = declWith $ ieWrappedName t
+    lookupExport (IEThingAll (L _ t))    = declWith $ ieWrappedName t
+    lookupExport (IEThingWith (L _ t) _ _ _) = declWith $ ieWrappedName t
     lookupExport (IEModuleContents (L _ m)) =
       moduleExports thisMod m dflags warnings gre exportedNames decls modMap instIfaceMap maps fixMap splices
     lookupExport (IEGroup lev docStr)  = return $



More information about the ghc-commits mailing list