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