protolude-0.2.2: A small prelude.

Safe HaskellTrustworthy
LanguageHaskell2010

Protolude

Synopsis

Documentation

identity :: a -> a #

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

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

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

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

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

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

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

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

pass :: Applicative f => f () #

Do nothing returning unit inside applicative.

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

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

type LText = Text #

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

Lift an IO operation with 1 argument into another monad

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

Lift an IO operation with 2 arguments into another monad

die :: Text -> IO a #