You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
It seems like there could exist an equivalent stack-safe applicative, similar to MonadRec, working title ApplicativeRec, with a trampolineA :: ApplicativeRec f => f (a -> RR a b) -> f a -> f b. Furthermore, it would get an instance for free for every MonadRec in the form of trampolineA f = trampolineM (\a -> fmap ($ a) f).
However, applicatives that support custom zip semantics (like IO that can zip in parallel), or applicatives that are implicitly stack-safe but do not support parallel execution (like Lazy) could offer better implementations than the default built on trampolineM.
This may also make it possible for SafeT to preserve nested stack-safe parallel composition for zips.
The text was updated successfully, but these errors were encountered:
It seems like there could exist an equivalent stack-safe applicative, similar to
MonadRec
, working titleApplicativeRec
, with atrampolineA :: ApplicativeRec f => f (a -> RR a b) -> f a -> f b
. Furthermore, it would get an instance for free for everyMonadRec
in the form oftrampolineA f = trampolineM (\a -> fmap ($ a) f)
.However, applicatives that support custom zip semantics (like
IO
that can zip in parallel), or applicatives that are implicitly stack-safe but do not support parallel execution (likeLazy
) could offer better implementations than the default built ontrampolineM
.This may also make it possible for
SafeT
to preserve nested stack-safe parallel composition for zips.The text was updated successfully, but these errors were encountered: