[commit: haddock] master: Add missing `traverse` method for `GenLocated` (4963328)
git at git.haskell.org
git at git.haskell.org
Wed Sep 18 12:49:06 CEST 2013
Repository : ssh://git@git.haskell.org/haddock
On branch : master
Link : http://git.haskell.org/haddock.git/commitdiff/49633289911c00addd869e38581ff73e23f13e5f
>---------------------------------------------------------------
commit 49633289911c00addd869e38581ff73e23f13e5f
Author: Herbert Valerio Riedel <hvr at gnu.org>
Date: Wed Sep 18 10:15:28 2013 +0200
Add missing `traverse` method for `GenLocated`
As `Traversable` needs at least one of `traverse` or `sequenceA` to be
overridden.
Signed-off-by: Herbert Valerio Riedel <hvr at gnu.org>
>---------------------------------------------------------------
49633289911c00addd869e38581ff73e23f13e5f
src/Haddock/GhcUtils.hs | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/src/Haddock/GhcUtils.hs b/src/Haddock/GhcUtils.hs
index 82ccb59..467541f 100644
--- a/src/Haddock/GhcUtils.hs
+++ b/src/Haddock/GhcUtils.hs
@@ -182,7 +182,7 @@ instance Foldable (GenLocated l) where
instance Traversable (GenLocated l) where
mapM f (L l x) = (return . L l) =<< f x
-
+ traverse f (L l x) = L l <$> f x
-------------------------------------------------------------------------------
-- * NamedThing instances
More information about the ghc-commits
mailing list