protolude-0.2: A small prelude.

Safe HaskellTrustworthy
LanguageHaskell2010

Protolude

Synopsis

Documentation

($!) :: (a -> b) -> a -> b infixr 0 Source #

identity :: a -> a Source #

map :: Functor f => (a -> b) -> f a -> f b Source #

uncons :: [a] -> Maybe (a, [a]) Source #

unsnoc :: [x] -> Maybe ([x], x) Source #

applyN :: Int -> (a -> a) -> a -> a Source #

print :: (MonadIO m, Show a) => a -> m () Source #

throwIO :: (MonadIO m, Exception e) => e -> m a Source #

throwTo :: (MonadIO m, Exception e) => ThreadId -> e -> m () Source #

foreach :: Functor f => f a -> (a -> b) -> f b Source #

(<&>) :: Functor f => f a -> (a -> b) -> f b infixl 4 Source #

Infix version of foreach.

& is to <$> what & is to $.

show :: (Show a, StringConv String b) => a -> b Source #

pass :: Applicative f => f () Source #

Do nothing returning unit inside applicative.

guarded :: Alternative f => (a -> Bool) -> a -> f a Source #

guardedA :: (Functor f, Alternative t) => (a -> f Bool) -> a -> f (t a) Source #

liftIO1 :: MonadIO m => (a -> IO b) -> a -> m b Source #

Lift an IO operation with 1 argument into another monad

liftIO2 :: MonadIO m => (a -> b -> IO c) -> a -> b -> m c Source #

Lift an IO operation with 2 arguments into another monad

die :: Text -> IO a Source #