-- Hoogle documentation, generated by Haddock -- See Hoogle, http://www.haskell.org/hoogle/ -- | Prelude classes using ConstraintKinds -- -- Please see README.md @package constraint-classes @version 0.4.0 module Control.ConstraintClasses class CFunctor f where type Con f a :: Constraint type Con f a = () where { type family Con f a :: Constraint; type Con f a = (); } _fmap :: (CFunctor f, Con f a, Con f b) => (a -> b) -> f a -> f b class CFunctor f => CApplicative f _pure :: (CApplicative f, Con f a) => a -> f a _liftA2 :: (CApplicative f, Con f a, Con f b, Con f c) => (a -> b -> c) -> f a -> f b -> f c _liftA3 :: (CApplicative f, Con f a, Con f b, Con f c, Con f d) => (a -> b -> c -> d) -> f a -> f b -> f c -> f d _liftA4 :: (CApplicative f, 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 class CApplicative f => CMonad f _concatMap :: (CMonad f, Con f a, Con f b) => (a -> f b) -> f a -> f b class CFoldable f where _fold = _foldMap id _foldMap f = _foldr (mappend . f) mempty _length = _foldl (\ c _ -> c + 1) 0 _forM = flip _mapM _forM_ = flip _mapM_ _foldr :: (CFoldable f, Con f a) => (a -> b -> b) -> b -> f a -> b _foldr' :: (CFoldable f, Con f a) => (a -> b -> b) -> b -> f a -> b _foldl :: (CFoldable f, Con f b) => (a -> b -> a) -> a -> f b -> a _foldl' :: (CFoldable f, Con f b) => (a -> b -> a) -> a -> f b -> a _fold :: (CFoldable f, Con f m, Monoid m) => f m -> m _foldMap :: (CFoldable f, Con f a, Con f m, Monoid m) => (a -> m) -> f a -> m _length :: (CFoldable f, Con f a) => f a -> Int _mapM :: (CFoldable f, Monad m, Con f a, Con f b) => (a -> m b) -> f a -> m (f b) _forM :: (CFoldable f, Monad m, Con f a, Con f b) => f a -> (a -> m b) -> m (f b) _mapM_ :: (CFoldable f, Monad m, Con f a) => (a -> m b) -> f a -> m () _forM_ :: (CFoldable f, Monad m, Con f a) => f a -> (a -> m b) -> m () class (CFunctor t, CFoldable t) => CTraversable t _traverse :: (CTraversable t, Con t a, Con t b, Monad f) => (a -> f b) -> t a -> f (t b) class CFunctor f => CZippable f _zipWith :: (CZippable f, Con f a, Con f b, Con f c) => (a -> b -> c) -> f a -> f b -> f c _zipWith3 :: (CZippable f, Con f a, Con f b, Con f c, Con f d) => (a -> b -> c -> d) -> f a -> f b -> f c -> f d _zipWith4 :: (CZippable f, 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 class CFunctor f => CIndexed f i | f -> i (!) :: (CIndexed f i, Con f a) => f a -> i -> a