compdata-0.2: Compositional Data Types

Portabilitynon-portable (GHC Extensions)
Stabilityexperimental
MaintainerPatrick Bahr <paba@diku.dk>

Data.Comp.Multi.Foldable

Description

This module defines higher-order foldable functors.

Synopsis

Documentation

class HFunctor h => HFoldable h whereSource

Higher-order functors that can be folded.

Minimal complete definition: hfoldMap or hfoldr.

Methods

hfold :: Monoid m => h (K m) :=> mSource

hfoldMap :: Monoid m => (a :=> m) -> h a :=> mSource

hfoldr :: (a :=> (b -> b)) -> b -> h a :=> bSource

hfoldl :: (b -> a :=> b) -> b -> h a :=> bSource

hfoldr1 :: forall a. (a -> a -> a) -> h (K a) :=> aSource

hfoldl1 :: forall a. (a -> a -> a) -> h (K a) :=> aSource

Instances

HFoldable f => HFoldable (:&: f a) 
(HFoldable f, HFoldable g) => HFoldable (:+: f g) 

kfoldr :: HFoldable f => (a -> b -> b) -> b -> f (K a) :=> bSource

kfoldl :: HFoldable f => (b -> a -> b) -> b -> f (K a) :=> bSource

htoList :: HFoldable f => f a :=> [A a]Source