compdata-0.12.1: Compositional Data Types
Copyright(c) 2011 Patrick Bahr
LicenseBSD3
MaintainerPatrick Bahr <paba@diku.dk>
Stabilityexperimental
Portabilitynon-portable (GHC Extensions)
Safe HaskellSafe-Inferred
LanguageHaskell2010

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

Instances details
HFoldable f => HFoldable (Cxt h f) Source # 
Instance details

Defined in Data.Comp.Multi.Term

Methods

hfold :: Monoid m => Cxt h f (K m) :=> m Source #

hfoldMap :: forall m (a :: Type -> Type). Monoid m => (a :=> m) -> Cxt h f a :=> m Source #

hfoldr :: forall (a :: Type -> Type) b. (a :=> (b -> b)) -> b -> Cxt h f a :=> b Source #

hfoldl :: forall b (a :: Type -> Type). (b -> a :=> b) -> b -> Cxt h f a :=> b Source #

hfoldr1 :: (a -> a -> a) -> Cxt h f (K a) :=> a Source #

hfoldl1 :: (a -> a -> a) -> Cxt h f (K a) :=> a Source #

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

Defined in Data.Comp.Multi.Ops

Methods

hfold :: Monoid m => (f :&: a) (K m) :=> m Source #

hfoldMap :: forall m (a0 :: Type -> Type). Monoid m => (a0 :=> m) -> (f :&: a) a0 :=> m Source #

hfoldr :: forall (a0 :: Type -> Type) b. (a0 :=> (b -> b)) -> b -> (f :&: a) a0 :=> b Source #

hfoldl :: forall b (a0 :: Type -> Type). (b -> a0 :=> b) -> b -> (f :&: a) a0 :=> b Source #

hfoldr1 :: (a0 -> a0 -> a0) -> (f :&: a) (K a0) :=> a0 Source #

hfoldl1 :: (a0 -> a0 -> a0) -> (f :&: a) (K a0) :=> a0 Source #

(HFoldable f, HFoldable g) => HFoldable (f :+: g) Source # 
Instance details

Defined in Data.Comp.Multi.Ops

Methods

hfold :: Monoid m => (f :+: g) (K m) :=> m Source #

hfoldMap :: forall m (a :: Type -> Type). Monoid m => (a :=> m) -> (f :+: g) a :=> m Source #

hfoldr :: forall (a :: Type -> Type) b. (a :=> (b -> b)) -> b -> (f :+: g) a :=> b Source #

hfoldl :: forall b (a :: Type -> Type). (b -> a :=> b) -> b -> (f :+: g) a :=> b Source #

hfoldr1 :: (a -> a -> a) -> (f :+: g) (K a) :=> a Source #

hfoldl1 :: (a -> a -> a) -> (f :+: g) (K a) :=> a Source #

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 #