Closed viercc closed 1 year ago
This adds Foldable Ap and Foldable1 Ap instance to the free applicative Control.Applicative.Free.Ap.
Foldable Ap
Foldable1 Ap
Control.Applicative.Free.Ap
The intended behavior of Foldable (Ap f) instance is to satisfy:
Foldable (Ap f)
toList @(Ap f) == runAp (toList @f) :: Ap f a -> [a]
Similarly, Foldable1 (Ap f) is meant to satisfy
Foldable1 (Ap f)
toNonEmpty @(Ap f) == runAp (toNonEmpty @f) :: Ap f a -> NonEmpty a
This adds
Foldable Ap
andFoldable1 Ap
instance to the free applicativeControl.Applicative.Free.Ap
.The intended behavior of
Foldable (Ap f)
instance is to satisfy:Similarly,
Foldable1 (Ap f)
is meant to satisfy