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 (Proxy rl) b) => HFoldl f x (Proxy 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 (Proxy sym) x (Proxy y) z, HFoldlWithIndex f z (Proxy rl) b) => HFoldlWithIndex f x (Proxy (Cons sym y rl)) b
HFoldlWithIndex f x (Proxy 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 :: Type -> Type -> RowList Type -> Row Type -> Type -> Constraint
class FoldlRecord f x (rl :: RowList Type) (r :: Row Type) b | f x rl -> b, rl -> r where
Members
foldlRecordRowList :: forall proxy. f -> x -> proxy rl -> Record r -> b
Instances
(IsSymbol sym, Cons sym a r' r, FoldingWithIndex f (Proxy 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 :: Type -> Type -> RowList Type -> Row Type -> Type -> Constraint
class FoldlVariant f x (rl :: RowList Type) (r :: Row Type) b | f x rl -> b, rl -> r where
Members
foldlVariantRowList :: forall proxy. proxy rl -> f -> x -> Variant r -> b
Instances
(IsSymbol sym, Cons sym a r1 r2, FoldingWithIndex f (Proxy 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 :: Type -> Type -> RowList (Type -> Type) -> Row (Type -> Type) -> Type -> Type -> Constraint
class FoldlVariantF f x (rl :: RowList (Type -> Type)) (r :: Row (Type -> Type)) z y | f x rl z -> r y where
Members
foldlVariantFRowList :: forall proxy. proxy rl -> f -> x -> VariantF r z -> y
Instances
(IsSymbol sym, Cons sym a r1 r2, FoldingWithIndex f (Proxy sym) x (a z) y, FoldlVariantF f x rest r1 z y) => FoldlVariantF f x (Cons sym a rest) r2 z y
FoldlVariantF f x Nil () z y