data-diverse-2.0.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

(Case (c r) ((:) Type x xs), Reiterate (c r) ((:) Type x xs), AFoldable (Collector * c xs) r, (~) * r (CaseResult * Type (c r) x)) => AFoldable (Collector * c ((:) Type x xs)) r Source #

Folds values by reiterateing Cases through the xs typelist.

Methods

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

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

nill case that doesn't even use case', so that an instance of Case '[] is not needed.

Methods

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

(Case (c r n) ((:) Type x xs), ReiterateN (c r) n ((:) Type x xs), AFoldable (CollectorN * c ((+) n 1) xs) r, (~) * r (CaseResult * Type (c r n) x)) => AFoldable (CollectorN * c n ((:) Type x xs)) r Source #

Folds values by reiterateing Emitters through the xs typelist.

Methods

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

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

nill case that doesn't even use case', so that an instance of Case '[] is not needed.

Methods

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

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