Make Data.Functor compatible with non-GHC compilers.
[ghc-base.git] / Data / Functor.hs
index c3e36fd..e5b8166 100644 (file)
 
 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 <$>