Safe Haskell | None |
---|---|
Language | Haskell2010 |
Definition of supermonads that support constrained monads.
- class (Functor m, Functor n, Functor p) => Bind m n p where
- type BindCts m n p (a :: *) (b :: *) :: Constraint
- class Functor m => Return m where
- type ReturnCts m (a :: *) :: Constraint
- class Fail m where
- type FailCts m (a :: *) :: Constraint
- class (Functor m, Functor n, Functor p) => Applicative m n p where
- type ApplicativeCts m n p (a :: *) (b :: *) :: Constraint
- type ApplicativeCtsR m n p (a :: *) (b :: *) :: Constraint
- type ApplicativeCtsL m n p (a :: *) (b :: *) :: Constraint
- pure :: (Return f, ReturnCts f a) => a -> f a
- class Functor f where
- type FunctorCts f (a :: *) (b :: *) :: Constraint
- type family Monad m :: Constraint where ...
Supermonads
class (Functor m, Functor n, Functor p) => Bind m n p where Source #
See Control.Supermonad.
Bind
for details on laws and requirements.
(>>=) :: BindCts m n p a b => m a -> (a -> n b) -> p b infixl 1 Source #
(>>) :: BindCts m n p a b => m a -> n b -> p b infixl 1 Source #
class Functor m => Return m where Source #
See Bind
for details on laws and requirements.
type ReturnCts m (a :: *) :: Constraint Source #
See Bind
for details on laws and requirements.
type FailCts m (a :: *) :: Constraint Source #
Super-Applicatives
class (Functor m, Functor n, Functor p) => Applicative m n p where Source #
TODO
type ApplicativeCts m n p (a :: *) (b :: *) :: Constraint Source #
type ApplicativeCtsR m n p (a :: *) (b :: *) :: Constraint Source #
type ApplicativeCtsL m n p (a :: *) (b :: *) :: Constraint Source #
(<*>) :: ApplicativeCts m n p a b => m (a -> b) -> n a -> p b infixl 4 Source #
(*>) :: ApplicativeCtsR m n p a b => m a -> n b -> p b infixl 4 Source #
(<*) :: ApplicativeCtsL m n p a b => m a -> n b -> p a infixl 4 Source #
class Functor 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.
type FunctorCts f (a :: *) (b :: *) :: Constraint Source #
fmap :: FunctorCts f a b => (a -> b) -> f a -> f b Source #
(<$) :: FunctorCts f b a => a -> f b -> f a infixl 4 Source #