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:
cea1e41
)
Make Data.Functor compatible with non-GHC compilers.
author
Malcolm.Wallace@cs.york.ac.uk
<unknown>
Fri, 9 Oct 2009 13:48:21 +0000
(13:48 +0000)
committer
Malcolm.Wallace@cs.york.ac.uk
<unknown>
Fri, 9 Oct 2009 13:48:21 +0000
(13:48 +0000)
Data/Functor.hs
patch
|
blob
|
history
diff --git
a/Data/Functor.hs
b/Data/Functor.hs
index
c3e36fd
..
e5b8166
100644
(file)
--- a/
Data/Functor.hs
+++ b/
Data/Functor.hs
@@
-13,12
+13,16
@@
module Data.Functor
(
- Functor(fmap, (<$)),
+ Functor(fmap),
+ (<$),
(<$>),
) where
#ifdef __GLASGOW_HASKELL__
import GHC.Base (Functor(..))
+#else
+(<$) :: Functor f => a -> f b -> f a
+(<$) = fmap . const
#endif
infixl 4 <$>