pointless-haskell-0.0.5: Pointless Haskell library

Portability non-portable experimental hpacheco@di.uminho.pt

Generics.Pointless.MonadCombinators

Description

Pointless Haskell: point-free programming with recursion patterns as hylomorphisms

This module lifts many standard combinators used for point-free programming to combinators over monads.

Synopsis

# Documentation

(<<=) :: Monad m => (a -> m b) -> m a -> m bSource

The left-to-right monadic binding combinator.

bind :: Monad m => (a -> m b, m a) -> m bSource

Higher-order monadic binding.

mlexp :: Monad m => (a -> m b) -> (b -> m c) -> a -> m cSource

The monadic left exponentiation combinator.

mrexp :: Monad m => (b -> m c) -> (a -> m b) -> a -> m cSource

The monadic right exponentiation combinator.

(-||-) :: Monad m => (a -> m b) -> (c -> m d) -> Either a c -> m (Either b d)Source

The monadic sum combinator.

mstrength :: Monad m => (b, m a) -> m (b, a)Source

The strength combinator for strong monads. In Haskell, every monad is a strong monad: http://comonad. com/reader/2008/deriving-strength-from-laziness/.

mfuse :: Monad m => (m a, m b) -> m (a, b)Source

The monadic fusion combinator. Performs left-to-right distribution of a strong monad over a product.

(/|\) :: Monad m => (a -> m b) -> (a -> m c) -> a -> m (b, c)Source

The monadic split combinator.

(>|<) :: Monad m => (a -> m c) -> (b -> m d) -> (a, b) -> m (c, d)Source

The monadic product combinator.