fix exports for functor module

This commit is contained in:
Stephen Diehl
2016-12-12 16:10:49 +00:00
parent 257a38f68f
commit c7eeb5349e
+8 -4
View File
@@ -6,9 +6,12 @@ module Functor (
Functor(..), Functor(..),
($>), ($>),
(<$>), (<$>),
(<<$>>),
void, void,
) where ) where
import Data.Function ((.))
#if (__GLASGOW_HASKELL__ >= 710) #if (__GLASGOW_HASKELL__ >= 710)
import Data.Functor ( import Data.Functor (
Functor(..) Functor(..)
@@ -23,16 +26,17 @@ import Data.Functor (
) )
import Data.Function (flip) import Data.Function (flip)
import Data.Function ((.))
infixl 4 $> infixl 4 $>
($>) :: Functor f => f a -> b -> f b ($>) :: Functor f => f a -> b -> f b
($>) = flip (<$) ($>) = flip (<$)
(<<$>>) :: (Functor f, Functor g) => (a -> b) -> f (g a) -> f (g b)
(<<$>>) = fmap . fmap
void :: Functor f => f a -> f () void :: Functor f => f a -> f ()
void x = () <$ x void x = () <$ x
#endif #endif
infixl 4 <<$>>
(<<$>>) :: (Functor f, Functor g) => (a -> b) -> f (g a) -> f (g b)
(<<$>>) = fmap . fmap