On Base 4.11 use the provided <&>, fixes #53

This commit is contained in:
Stephen Diehl
2018-03-26 11:33:46 +01:00
parent 60943c0596
commit 243a309bc1
2 changed files with 20 additions and 12 deletions
-11
View File
@@ -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 ()