Copyright | (c) 2009 University of Minho |
---|---|
License | BSD3 |
Maintainer | hpacheco@di.uminho.pt |
Stability | experimental |
Portability | non-portable |
Safe Haskell | None |
Language | Haskell98 |
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
(<<=) :: Monad m => (a -> m b) -> m a -> m b infixl 1 Source
The left-to-right monadic binding combinator.
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.