Safe Haskell | None |
---|---|
Language | Haskell2010 |
Control.Supermonad.Constrained
Contents
Description
Definition of supermonads that support constrained monads.
- class (CFunctor m, CFunctor n, CFunctor p) => Bind m n p where
- type BindCts m n p (a :: *) (b :: *) :: Constraint
- class CFunctor m => Return m where
- type ReturnCts m (a :: *) :: Constraint
- class Fail m where
- type FailCts m (a :: *) :: Constraint
- class CFunctor f where
- type CFunctorCts f (a :: *) (b :: *) :: Constraint
- type family Monad m :: Constraint where ...
Supermonads
class (CFunctor m, CFunctor n, CFunctor p) => Bind m n p where Source #
See Control.Supermonad.
Bind
for details on laws and requirements.
Minimal complete definition
Instances
class CFunctor m => Return m where Source #
See Bind
for details on laws and requirements.
Minimal complete definition
Associated Types
type ReturnCts m (a :: *) :: Constraint Source #
Instances
See Bind
for details on laws and requirements.
Minimal complete definition
Associated Types
type FailCts m (a :: *) :: Constraint Source #
Instances
class CFunctor f where Source #
Class for constrained functors. Obeys all of the same laws as the standard
Functor
class, but allows to constrain the functors result type.
Minimal complete definition
Associated Types
type CFunctorCts f (a :: *) (b :: *) :: Constraint Source #
Methods
fmap :: CFunctorCts f a b => (a -> b) -> f a -> f b Source #
(<$) :: CFunctorCts f b a => a -> f b -> f a Source #
Instances