constraint-classes-0.4.0: Prelude classes using ConstraintKinds

Safe HaskellNone
LanguageHaskell2010

Control.ConstraintClasses

Documentation

class CFunctor f where Source #

Associated Types

type Con f a :: Constraint Source #

Methods

_fmap :: (Con f a, Con f b) => (a -> b) -> f a -> f b Source #

class CFunctor f => CApplicative f where Source #

Methods

_pure :: Con f a => a -> f a Source #

_liftA2 :: (Con f a, Con f b, Con f c) => (a -> b -> c) -> f a -> f b -> f c Source #

_liftA3 :: (Con f a, Con f b, Con f c, Con f d) => (a -> b -> c -> d) -> f a -> f b -> f c -> f d Source #

_liftA4 :: (Con f a, Con f b, Con f c, Con f d, Con f e) => (a -> b -> c -> d -> e) -> f a -> f b -> f c -> f d -> f e Source #

class CApplicative f => CMonad f where Source #

Methods

_concatMap :: (Con f a, Con f b) => (a -> f b) -> f a -> f b Source #

class CFoldable f where Source #

Minimal complete definition

_foldMap | _foldr

Methods

_foldr :: Con f a => (a -> b -> b) -> b -> f a -> b Source #

_foldr' :: Con f a => (a -> b -> b) -> b -> f a -> b Source #

_foldl :: Con f b => (a -> b -> a) -> a -> f b -> a Source #

_foldl' :: Con f b => (a -> b -> a) -> a -> f b -> a Source #

_fold :: (Con f m, Monoid m) => f m -> m Source #

_foldMap :: (Con f a, Con f m, Monoid m) => (a -> m) -> f a -> m Source #

_length :: Con f a => f a -> Int Source #

_mapM :: (Monad m, Con f a, Con f b) => (a -> m b) -> f a -> m (f b) Source #

_forM :: (Monad m, Con f a, Con f b) => f a -> (a -> m b) -> m (f b) Source #

_mapM_ :: (Monad m, Con f a) => (a -> m b) -> f a -> m () Source #

_forM_ :: (Monad m, Con f a) => f a -> (a -> m b) -> m () Source #

class (CFunctor t, CFoldable t) => CTraversable t where Source #

Methods

_traverse :: (Con t a, Con t b, Monad f) => (a -> f b) -> t a -> f (t b) Source #

class CFunctor f => CZippable f where Source #

Methods

_zipWith :: (Con f a, Con f b, Con f c) => (a -> b -> c) -> f a -> f b -> f c Source #

_zipWith3 :: (Con f a, Con f b, Con f c, Con f d) => (a -> b -> c -> d) -> f a -> f b -> f c -> f d Source #

_zipWith4 :: (Con f a, Con f b, Con f c, Con f d, Con f e) => (a -> b -> c -> d -> e) -> f a -> f b -> f c -> f d -> f e Source #

class CFunctor f => CIndexed f i | f -> i where Source #

Minimal complete definition

(!)

Methods

(!) :: Con f a => f a -> i -> a Source #