-
-
Notifications
You must be signed in to change notification settings - Fork 1.2k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Free.foldMap is not stack safe #721
Comments
We can implement a stack-safe
I would be leaning more towards 2., to promote stack-safety by default. For cases where people don't have a stack-safe monad, but stack-safety is not a problem b/c their |
I suppose it brings also constant-stack execution, right? |
@mandubian my definition of stack-safety is constant-stack usage, so I don't understand your first question. Regarding the latter, are there some existing |
I don't think there are benches but it would be useful ;) |
Fixes typelevel#721. The fix is possible by strengthening constraints on the target monad from Monad to MonadRec.
Fixes typelevel#721. The fix is possible by strengthening constraints on the target monad from Monad to MonadRec.
This is a followup to #713. #702 made
Free.foldMap
stack safe (and added a test for this), but unfortunately it had to be backed out because it introduced a bug. Currently the stack safety test forfoldMap
is ignored.There was some discussion in #713 as to what should happen for this. I'm no expert in the matter. I'm hoping some others such as @mandubian or @adelbertc might be able to weigh in.
The text was updated successfully, but these errors were encountered: