pointless-haskell-0.0.9: Pointless Haskell library

Copyright(c) 2009 University of Minho
LicenseBSD3
Maintainerhpacheco@di.uminho.pt
Stabilityexperimental
Portabilitynon-portable
Safe HaskellNone
LanguageHaskell98

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 b infixl 1 Source

The left-to-right monadic binding combinator.

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

Higher-order monadic binding.

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

The monadic left exponentiation combinator.

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

The monadic right exponentiation combinator.

(-||-) :: Monad m => (a -> m b) -> (c -> m d) -> Either a c -> m (Either b d) infix 5 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) infix 6 Source

The monadic split combinator.

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

The monadic product combinator.