Portability | non-portable |
---|---|

Stability | experimental |

Maintainer | hpacheco@di.uminho.pt |

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.

- (<<=) :: Monad m => (a -> m b) -> m a -> m b
- bind :: Monad m => (a -> m b, m a) -> m b
- mlexp :: Monad m => (a -> m b) -> (b -> m c) -> a -> m c
- mrexp :: Monad m => (b -> m c) -> (a -> m b) -> a -> m c
- (-||-) :: Monad m => (a -> m b) -> (c -> m d) -> Either a c -> m (Either b d)
- mstrength :: Monad m => (b, m a) -> m (b, a)
- mfuse :: Monad m => (m a, m b) -> m (a, b)
- (/|\) :: Monad m => (a -> m b) -> (a -> m c) -> a -> m (b, c)
- (>|<) :: Monad m => (a -> m c) -> (b -> m d) -> (a, b) -> m (c, d)

# Documentation

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/.