| Copyright | (C) 2026 - Eitan Chatav |
|---|---|
| License | BSD-style (see the file LICENSE) |
| Maintainer | Eitan Chatav <eitan.chatav@gmail.com> |
| Stability | provisional |
| Portability | non-portable |
| Safe Haskell | None |
| Language | Haskell2010 |
Data.Profunctor.Monadic
Contents
Description
See Li-yao Xia, Monadic profunctors for bidirectional programming
This module can provide qualified do-notation for Monadic profunctors.
>>>:set -XQualifiedDo>>>import qualified Data.Profunctor.Monadic as P
See Control.Lens.Grammar for an example of how to use qualified do-notation with pattern bonding.
Synopsis
- type Monadic (p :: Type -> Type -> Type) = (Profunctor p, forall x. Monad (p x))
- (>>=) :: Monadic p => p a b -> (b -> p c d) -> p (a, c) (b, d)
- (>>) :: Monadic p => p () c -> p a b -> p a b
- return :: (Monadic p, Choice p) => Prism a b () () -> p a b
- type MonadicTry (p :: Type -> Type -> Type) = (Profunctor p, forall x. MonadTry (p x))
- try :: MonadTry m => m a -> m a
- fail :: MonadFail m => String -> m a
Monadic
type Monadic (p :: Type -> Type -> Type) = (Profunctor p, forall x. Monad (p x)) Source #
A Profunctor which is also a Monad.
MonadicTry
type MonadicTry (p :: Type -> Type -> Type) = (Profunctor p, forall x. MonadTry (p x)) Source #
A Profunctor which is also a MonadTry.