data-diverse-0.1.0.0: Extensible records and polymorphic variants.

Safe HaskellSafe
LanguageHaskell2010

Data.Diverse.AFoldable

Synopsis

Documentation

class AFoldable t a where Source #

Constrained Foldable for a specified type instead for all types.

Minimal complete definition

afoldr

Methods

afoldr :: (a -> b -> b) -> b -> t a -> b Source #

Instances

(Emit Type e ((:) Type x xs) r, Reiterate * e ((:) Type x xs), AFoldable (Collector0 * e xs) r) => AFoldable (Collector0 * e ((:) Type x xs)) r Source #

Folds values by reiterateing Emitters through the xs typelist.

Methods

afoldr :: (r -> b -> b) -> b -> Collector0 * e ((Type ': x) xs) r -> b Source #

Emit Type e ([] Type) r => AFoldable (Collector0 * e ([] Type)) r Source #

terminating case that does use Emit e '[]

Methods

afoldr :: (r -> b -> b) -> b -> Collector0 * e [Type] r -> b Source #

(Emit Type e ((:) Type x xs) r, Reiterate * e ((:) Type x xs), AFoldable (Collector * e xs) r) => AFoldable (Collector * e ((:) Type x xs)) r Source #

Folds values by reiterateing Emitters through the xs typelist.

Methods

afoldr :: (r -> b -> b) -> b -> Collector * e ((Type ': x) xs) r -> b Source #

AFoldable (Collector * e ([] Type)) r Source #

null case that doesn't even use emit, so that an instance of Emit e '[] is not needed.

Methods

afoldr :: (r -> b -> b) -> b -> Collector * e [Type] r -> b Source #

(Emit Type (e n) ((:) Type x xs) r, ReiterateN * e n ((:) Type x xs), AFoldable (CollectorN0 * e ((+) n 1) xs) r) => AFoldable (CollectorN0 * e n ((:) Type x xs)) r Source #

Folds values by reiterateNing Emitters through the xs typelist.

Methods

afoldr :: (r -> b -> b) -> b -> CollectorN0 * e n ((Type ': x) xs) r -> b Source #

Emit Type (e n) ([] Type) r => AFoldable (CollectorN0 * e n ([] Type)) r Source #

terminating case that does use Emit (e n) '[]

Methods

afoldr :: (r -> b -> b) -> b -> CollectorN0 * e n [Type] r -> b Source #

(Emit Type (e n) ((:) Type x xs) r, ReiterateN * e n ((:) Type x xs), AFoldable (CollectorN * e ((+) n 1) xs) r) => AFoldable (CollectorN * e n ((:) Type x xs)) r Source #

Folds values by reiterateNing Emitters through the xs typelist.

Methods

afoldr :: (r -> b -> b) -> b -> CollectorN * e n ((Type ': x) xs) r -> b Source #

AFoldable (CollectorN * e n ([] Type)) r Source #

null case that doesn't even use emit, so that an instance of Emit (e n) '[] is not needed.

Methods

afoldr :: (r -> b -> b) -> b -> CollectorN * e n [Type] r -> b Source #

afoldl' :: AFoldable t a => (b -> a -> b) -> b -> t a -> b Source #