[commit: haddock] wip/D538: IEThingAbs now carries a Located name (fced924)

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


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

On branch  : wip/D538
Link       : http://git.haskell.org/haddock.git/commitdiff/fced9248d5db11b393c4a246b5b0fe8044ec9d0e

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

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

    IEThingAbs now carries a Located name


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

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

diff --git a/haddock-api/src/Haddock/GhcUtils.hs b/haddock-api/src/Haddock/GhcUtils.hs
index 9f9b269..c33c27b 100644
--- a/haddock-api/src/Haddock/GhcUtils.hs
+++ b/haddock-api/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/haddock-api/src/Haddock/Interface/Create.hs b/haddock-api/src/Haddock/Interface/Create.hs
index f714e2f..68a98c8 100644
--- a/haddock-api/src/Haddock/Interface/Create.hs
+++ b/haddock-api/src/Haddock/Interface/Create.hs
@@ -496,7 +496,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