On Base 4.11 use the provided <&>, fixes #53
This commit is contained in:
@@ -17,7 +17,6 @@ module Protolude (
|
||||
print,
|
||||
throwIO,
|
||||
throwTo,
|
||||
foreach, (<&>),
|
||||
show,
|
||||
pass,
|
||||
guarded,
|
||||
@@ -590,16 +589,6 @@ throwIO = liftIO . Control.Exception.throwIO
|
||||
throwTo :: (X.MonadIO m, Exception e) => ThreadId -> e -> m ()
|
||||
throwTo tid e = liftIO (Control.Exception.throwTo tid e)
|
||||
|
||||
foreach :: Functor f => f a -> (a -> b) -> f b
|
||||
foreach = flip fmap
|
||||
|
||||
-- | Infix version of foreach.
|
||||
--
|
||||
-- @<&>@ is to '<$>' what '&' is to '$'.
|
||||
infixl 4 <&>
|
||||
(<&>) :: Functor f => f a -> (a -> b) -> f b
|
||||
(<&>) = foreach
|
||||
|
||||
-- | Do nothing returning unit inside applicative.
|
||||
pass :: Applicative f => f ()
|
||||
pass = pure ()
|
||||
|
||||
Reference in New Issue
Block a user