Module
Heterogeneous.Folding
- Package
- purescript-heterogeneous
- Repository
- natefaubion/purescript-heterogeneous
#FoldingWithIndex Source
class FoldingWithIndex f i x y z | f i x y -> z where
Members
foldingWithIndex :: f -> i -> x -> y -> z
Instances
FoldingWithIndex (i -> x -> y -> x) i x y x
(Folding f x y z) => FoldingWithIndex (ConstFolding f) i x y z
#HFoldl Source
class HFoldl f x a b | f x a -> b where
Members
hfoldl :: f -> x -> a -> b
Instances
(Foldable g, Folding f x y x) => HFoldl f x (App g y) x
(HFoldlWithIndex (ConstFolding f) x (RLProxy rl) b) => HFoldl f x (RLProxy rl) b
(RowToList r rl, FoldlRecord (ConstFolding f) x rl r b) => HFoldl f x (Record r) b
(Folding f x a y, Folding f y b z) => HFoldl f x (Tuple a b) z
(Folding f x a y, Folding f x b y) => HFoldl f x (Either a b) y
(RowToList r rl, FoldlVariant (ConstFolding f) x rl r y) => HFoldl f x (Variant r) y
(RowToList r rl, FoldlVariantF (ConstFolding f) x rl r z y) => HFoldl f x (VariantF r z) y
#HFoldlWithIndex Source
class HFoldlWithIndex f x a b | f x a -> b where
Members
hfoldlWithIndex :: f -> x -> a -> b
Instances
(FoldableWithIndex i g, FoldingWithIndex f i x y x) => HFoldlWithIndex f x (App g y) x
(FoldingWithIndex f (SProxy sym) x (Proxy y) z, HFoldlWithIndex f z (RLProxy rl) b) => HFoldlWithIndex f x (RLProxy (Cons sym y rl)) b
HFoldlWithIndex f x (RLProxy Nil) x
(RowToList r rl, FoldlRecord f x rl r b) => HFoldlWithIndex f x (Record r) b
(RowToList r rl, FoldlVariant f x rl r y) => HFoldlWithIndex f x (Variant r) y
(RowToList r rl, FoldlVariantF f x rl r z y) => HFoldlWithIndex f x (VariantF r z) y
#ConstFolding Source
newtype ConstFolding f
Constructors
Instances
(Folding f x y z) => FoldingWithIndex (ConstFolding f) i x y z
#FoldlRecord Source
class FoldlRecord f x (rl :: RowList) (r :: Row Type) b | f x rl -> b, rl -> r where
Members
foldlRecordRowList :: f -> x -> RLProxy rl -> Record r -> b
Instances
(IsSymbol sym, Cons sym a r' r, FoldingWithIndex f (SProxy sym) x a z, FoldlRecord f z rl r b) => FoldlRecord f x (Cons sym a rl) r b
FoldlRecord f x Nil r x
#FoldlVariant Source
class FoldlVariant f x (rl :: RowList) (r :: Row Type) b | f x rl -> b, rl -> r where
Members
foldlVariantRowList :: RLProxy rl -> f -> x -> Variant r -> b
Instances
(IsSymbol sym, Cons sym a r1 r2, FoldingWithIndex f (SProxy sym) x a y, FoldlVariant f x rest r1 y) => FoldlVariant f x (Cons sym a rest) r2 y
FoldlVariant f x Nil () y
#FoldlVariantF Source
class FoldlVariantF f x (rl :: RowList) (r :: Row Type) z y | f x rl z -> r y where
Members
foldlVariantFRowList :: RLProxy rl -> f -> x -> VariantF r z -> y
Instances
(IsSymbol sym, Cons sym (FProxy a) r1 r2, FoldingWithIndex f (SProxy sym) x (a z) y, FoldlVariantF f x rest r1 z y) => FoldlVariantF f x (Cons sym (FProxy a) rest) r2 z y
FoldlVariantF f x Nil () z y