Portability | non-portable (GHC Extensions) |
---|---|
Stability | experimental |
Maintainer | Tom Hvitved <hvitved@diku.dk> |
Safe Haskell | None |
This module defines traversable higher-order difunctors.
- class HDifunctor f => HDitraversable f where
- class HFoldable t => HTraversable t where
Documentation
class HDifunctor f => HDitraversable f whereSource
HDifunctors representing data structures that can be traversed from left to right.
(HDifunctor (:&: f p), HDitraversable f) => HDitraversable (:&: f p) | |
(HDifunctor (:+: f g), HDitraversable f, HDitraversable g) => HDitraversable (:+: f g) |
class HFoldable t => HTraversable t whereSource
hmapM :: Monad m => NatM m a b -> NatM m (t a) (t b)Source
Map each element of a structure to a monadic action, evaluate these actions from left to right, and collect the results.
Alternative type in terms of natural transformations using
functor composition :.:
:
hmapM :: Monad m => (a :-> m :.: b) -> t a :-> m :.: (t b)
htraverse :: Applicative f => NatM f a b -> NatM f (t a) (t b)Source
(HFoldable (Cxt h f), HTraversable f) => HTraversable (Cxt h f) | |
(HFoldable (:&: f a), HTraversable f) => HTraversable (:&: f a) | |
(HFoldable (:+: f g), HTraversable f, HTraversable g) => HTraversable (:+: f g) |