compdata-0.9: Compositional Data Types

Copyright(c) 2011 Patrick Bahr
LicenseBSD3
MaintainerPatrick Bahr <paba@diku.dk>
Stabilityexperimental
Portabilitynon-portable (GHC Extensions)
Safe HaskellSafe-Inferred
LanguageHaskell98

Data.Comp.Multi.HFoldable

Description

This module defines higher-order foldable functors.

Synopsis

Documentation

class HFunctor h => HFoldable h where Source

Higher-order functors that can be folded.

Minimal complete definition: hfoldMap or hfoldr.

Minimal complete definition

Nothing

Methods

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

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

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

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

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

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

Instances

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

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

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

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