Safe Haskell | None |
---|---|
Language | Haskell2010 |
Definition of constrained functors as they are required to work with constrained monads and constrained supermonads.
- class CFunctor f where
- type CFunctorCts f (a :: *) (b :: *) :: Constraint
Documentation
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.
type CFunctorCts f (a :: *) (b :: *) :: Constraint Source #
fmap :: CFunctorCts f a b => (a -> b) -> f a -> f b Source #
(<$) :: CFunctorCts f b a => a -> f b -> f a Source #