Copyright | (C) 2017 ATS Advanced Telematic Systems GmbH Jacob Stanley |
---|---|
License | BSD-style (see the file LICENSE) |
Maintainer | Stevan Andjelkovic <stevan@advancedtelematic.com> |
Stability | provisional |
Portability | non-portable (GHC extensions) |
Safe Haskell | Safe |
Language | Haskell2010 |
This module exports a higher-order version of functors, foldable functors, and traversable functors.
- class HFunctor (f :: (* -> *) -> * -> *) where
- hfmap :: HFunctor f => (forall a. g a -> h a) -> f g b -> f h b
- class HFunctor t => HFoldable (t :: (* -> *) -> * -> *) where
- hfoldMap :: (HFoldable t, Monoid m) => (forall a. v a -> m) -> t v b -> m
- class (HFunctor t, HFoldable t) => HTraversable (t :: (* -> *) -> * -> *) where
- htraverse :: (HTraversable t, Applicative f) => (forall a. g a -> f (h a)) -> t g b -> f (t h b)
Documentation
class HFunctor (f :: (* -> *) -> * -> *) where Source #
Higher-order functors.
hfmap :: HFunctor f => (forall a. g a -> h a) -> f g b -> f h b Source #
Higher-order version of fmap
.
class HFunctor t => HFoldable (t :: (* -> *) -> * -> *) where Source #
Higher-order foldable functors.
hfoldMap :: (HFoldable t, Monoid m) => (forall a. v a -> m) -> t v b -> m Source #
Higher-order version of foldMap
.
class (HFunctor t, HFoldable t) => HTraversable (t :: (* -> *) -> * -> *) where Source #
Higher-order traversable functors.
htraverse :: Applicative f => (forall a. g a -> f (h a)) -> t g b -> f (t h b) Source #
Higher-order version of traverse
.
htraverse :: (HTraversable t, Applicative f) => (forall a. g a -> f (h a)) -> t g b -> f (t h b) Source #
Higher-order version of traverse
.