-- Hoogle documentation, generated by Haddock -- See Hoogle, http://www.haskell.org/hoogle/ -- | Prelude classes using ConstraintKinds -- -- Please see README.org @package constraint-classes @version 0.3.0 module Control.ConstraintClasses class CFunctor f where type CFun f a :: Constraint type CFun f a = () where { type family CFun f a :: Constraint; type CFun f a = (); } _fmap :: (CFunctor f, CFun f a, CFun f b) => (a -> b) -> f a -> f b class CFoldable f where type CFol f a :: Constraint type CFol f a = () _fold = _foldMap id _foldMap f = _foldr (mappend . f) mempty _length = _foldl (\ c _ -> c + 1) 0 _forM = flip _mapM _forM_ = flip _mapM_ where { type family CFol f a :: Constraint; type CFol f a = (); } _foldr :: (CFoldable f, CFol f a) => (a -> b -> b) -> b -> f a -> b _foldr' :: (CFoldable f, CFol f a) => (a -> b -> b) -> b -> f a -> b _foldl :: (CFoldable f, CFol f b) => (a -> b -> a) -> a -> f b -> a _foldl' :: (CFoldable f, CFol f b) => (a -> b -> a) -> a -> f b -> a _fold :: (CFoldable f, CFol f m, Monoid m) => f m -> m _foldMap :: (CFoldable f, CFol f a, CFol f m, Monoid m) => (a -> m) -> f a -> m _length :: (CFoldable f, CFol f a) => f a -> Int _mapM :: (CFoldable f, Monad m, CFol f a, CFol f b) => (a -> m b) -> f a -> m (f b) _forM :: (CFoldable f, Monad m, CFol f a, CFol f b) => f a -> (a -> m b) -> m (f b) _mapM_ :: (CFoldable f, Monad m, CFol f a) => (a -> m b) -> f a -> m () _forM_ :: (CFoldable f, Monad m, CFol f a) => f a -> (a -> m b) -> m ()