[commit: haddock] wip/api-ann-hstylit-5: IEThingAbs now carries a Located name (126d5a1)

git at git.haskell.org git at git.haskell.org
Wed Jul 8 08:35:06 UTC 2015


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

On branch  : wip/api-ann-hstylit-5
Link       : http://git.haskell.org/haddock.git/commitdiff/126d5a1553782ec71a93d6cba920f748869b98b0

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

commit 126d5a1553782ec71a93d6cba920f748869b98b0
Author: Alan Zimmerman <alan.zimm at gmail.com>
Date:   Sat Dec 13 12:05:09 2014 +0200

    IEThingAbs now carries a Located name


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

126d5a1553782ec71a93d6cba920f748869b98b0
 src/Haddock/GhcUtils.hs         | 4 +++-
 src/Haddock/Interface/Create.hs | 2 +-
 2 files changed, 4 insertions(+), 2 deletions(-)

diff --git a/src/Haddock/GhcUtils.hs b/src/Haddock/GhcUtils.hs
index 9f9b269..c33c27b 100644
--- a/src/Haddock/GhcUtils.hs
+++ b/src/Haddock/GhcUtils.hs
@@ -1,3 +1,4 @@
+{-# LANGUAGE CPP #-}
 {-# LANGUAGE FlexibleInstances, ViewPatterns #-}
 {-# OPTIONS_GHC -fno-warn-orphans #-}
 {-# OPTIONS_HADDOCK hide #-}
@@ -185,10 +186,11 @@ before = (<) `on` getLoc
 instance Foldable (GenLocated l) where
   foldMap f (L _ x) = f x
 
-
+#if __GLASGOW_HASKELL__ < 709
 instance Traversable (GenLocated l) where
   mapM f (L l x) = (return . L l) =<< f x
   traverse f (L l x) = L l <$> f x
+#endif
 
 -------------------------------------------------------------------------------
 -- * NamedThing instances
diff --git a/src/Haddock/Interface/Create.hs b/src/Haddock/Interface/Create.hs
index 5420ef0..7b13ad6 100644
--- a/src/Haddock/Interface/Create.hs
+++ b/src/Haddock/Interface/Create.hs
@@ -493,7 +493,7 @@ mkExportItems
     Just exports -> liftM concat $ mapM lookupExport exports
   where
     lookupExport (IEVar (L _ x))         = declWith x
-    lookupExport (IEThingAbs t)          = declWith t
+    lookupExport (IEThingAbs (L _ t))    = declWith t
     lookupExport (IEThingAll (L _ t))    = declWith t
     lookupExport (IEThingWith (L _ t) _) = declWith t
     lookupExport (IEModuleContents (L _ m)) =



More information about the ghc-commits mailing list