projects
/
ghc-base.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(from parent 1:
ed87880
)
Add an INLINE pragme for fmapDefault
author
simonpj@microsoft.com
<unknown>
Wed, 27 Oct 2010 19:38:59 +0000
(19:38 +0000)
committer
simonpj@microsoft.com
<unknown>
Wed, 27 Oct 2010 19:38:59 +0000
(19:38 +0000)
Data/Traversable.hs
patch
|
blob
|
history
diff --git
a/Data/Traversable.hs
b/Data/Traversable.hs
index
28fa761
..
3d3ae70
100644
(file)
--- a/
Data/Traversable.hs
+++ b/
Data/Traversable.hs
@@
-172,6
+172,7
@@
mapAccumR f s t = runStateR (traverse (StateR . flip f) t) s
-- | This function may be used as a value for `fmap` in a `Functor` instance.
fmapDefault :: Traversable t => (a -> b) -> t a -> t b
+{-# INLINE fmapDefault #-}
fmapDefault f = getId . traverse (Id . f)
-- | This function may be used as a value for `Data.Foldable.foldMap`