fix exports for functor module
This commit is contained in:
+8
-4
@@ -6,9 +6,12 @@ module Functor (
|
||||
Functor(..),
|
||||
($>),
|
||||
(<$>),
|
||||
(<<$>>),
|
||||
void,
|
||||
) where
|
||||
|
||||
import Data.Function ((.))
|
||||
|
||||
#if (__GLASGOW_HASKELL__ >= 710)
|
||||
import Data.Functor (
|
||||
Functor(..)
|
||||
@@ -23,16 +26,17 @@ import Data.Functor (
|
||||
)
|
||||
|
||||
import Data.Function (flip)
|
||||
import Data.Function ((.))
|
||||
|
||||
infixl 4 $>
|
||||
|
||||
($>) :: Functor f => f a -> b -> f b
|
||||
($>) = flip (<$)
|
||||
|
||||
(<<$>>) :: (Functor f, Functor g) => (a -> b) -> f (g a) -> f (g b)
|
||||
(<<$>>) = fmap . fmap
|
||||
|
||||
void :: Functor f => f a -> f ()
|
||||
void x = () <$ x
|
||||
#endif
|
||||
|
||||
infixl 4 <<$>>
|
||||
|
||||
(<<$>>) :: (Functor f, Functor g) => (a -> b) -> f (g a) -> f (g b)
|
||||
(<<$>>) = fmap . fmap
|
||||
|
||||
Reference in New Issue
Block a user