data-diverse-4.6.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) (x ': xs), Reiterate (c r) (x ': xs), AFoldable (Collector c xs) r, r ~ CaseResult (c r) x) => AFoldable (Collector c (x ': xs)) r Source #

Folds values by reiterateing Cases through the xs typelist.

Instance details

Defined in Data.Diverse.Many.Internal

Methods

afoldr :: (r -> b -> b) -> b -> Collector c (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.

Instance details

Defined in Data.Diverse.Many.Internal

Methods

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

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

Folds values by reiterateing Emitters through the xs typelist.

Instance details

Defined in Data.Diverse.Many.Internal

Methods

afoldr :: (r -> b -> b) -> b -> CollectorN c n (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.

Instance details

Defined in Data.Diverse.Many.Internal

Methods

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

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