cubix-compdata-1.0.1: Compositional Data Types for Cubix
Copyright(c) 2011 Patrick Bahr
LicenseBSD3
MaintainerPatrick Bahr <paba@diku.dk>
Stabilityexperimental
Portabilitynon-portable (GHC Extensions)
Safe HaskellSafe
LanguageHaskell98

Data.Comp.Multi.HTraversable

Description

This module defines higher-order traversable functors.

Documentation

class HFoldable t => HTraversable t where Source #

Methods

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 #

Instances

Instances details
(All HTraversable fs, All HFoldable fs, All HFunctor fs) => HTraversable (Sum fs) Source # 
Instance details

Defined in Data.Comp.Multi.Ops

Methods

hmapM :: forall (m :: Type -> Type) (a :: Type -> Type) (b :: Type -> Type). Monad m => NatM m a b -> NatM m (Sum fs a) (Sum fs b) Source #

htraverse :: forall (f :: Type -> Type) (a :: Type -> Type) (b :: Type -> Type). Applicative f => NatM f a b -> NatM f (Sum fs a) (Sum fs b) Source #

HTraversable f => HTraversable (Cxt h f) Source # 
Instance details

Defined in Data.Comp.Multi.Term

Methods

hmapM :: forall (m :: Type -> Type) (a :: Type -> Type) (b :: Type -> Type). Monad m => NatM m a b -> NatM m (Cxt h f a) (Cxt h f b) Source #

htraverse :: forall (f0 :: Type -> Type) (a :: Type -> Type) (b :: Type -> Type). Applicative f0 => NatM f0 a b -> NatM f0 (Cxt h f a) (Cxt h f b) Source #

HTraversable f => HTraversable (f :&: a) Source # 
Instance details

Defined in Data.Comp.Multi.Ops

Methods

hmapM :: forall (m :: Type -> Type) (a0 :: Type -> Type) (b :: Type -> Type). Monad m => NatM m a0 b -> NatM m ((f :&: a) a0) ((f :&: a) b) Source #

htraverse :: forall (f0 :: Type -> Type) (a0 :: Type -> Type) (b :: Type -> Type). Applicative f0 => NatM f0 a0 b -> NatM f0 ((f :&: a) a0) ((f :&: a) b) Source #