Safe Haskell | Safe-Inferred |
---|
- skip :: Monad m => m ()
- discard :: Monad m => a -> m ()
- obvious :: Applicative f => f ()
- bind :: Monad m => m a -> (a -> m b) -> m b
- om :: Monad m => (a -> b -> m c) -> m a -> b -> m c
- nom :: Monad m => (a -> b -> m c) -> a -> m b -> m c
- doCallCC :: Monad m => ((r -> ContT r m b) -> ContT r m r) -> m r
- label :: ContT r m (ContT r m a)
- io :: MonadIO m => IO a -> m a
- liftMaybe :: MonadPlus m => Maybe a -> m a
Documentation
obvious :: Applicative f => f ()Source
Synonym for pure ()
.
om :: Monad m => (a -> b -> m c) -> m a -> b -> m cSource
Combinator for working with monadic values:
>>>
om when (return True) $ print "Hello"
"Hello">>>
return True >>= flip when (print "Hello")
"Hello">>>
om forM_ (return [True]) print
True>>>
flip forM_ print =<< return [True]
True>>>
mapM_ print =<< return [True]
True
Subsumes the need for individual functions for whenM
, unlessM
, etc.
nom :: Monad m => (a -> b -> m c) -> a -> m b -> m cSource
Variant of om
which changes the roles of the 2nd and 3rd arguments.
>>>
nom mapM_ print $ return [True]
True>>>
mapM_ print =<< return [True]
True
doCallCC :: Monad m => ((r -> ContT r m b) -> ContT r m r) -> m rSource
Convenience function if all you want to use is
callCC
.