Closed kozak closed 7 years ago
I think https://github.com/sanctuary-js/sanctuary-type-classes/pull/19 is related, and after the PR is merged and sanctuary-type-classes
updated this problem should go away. will take a closer look at it after #31
Thanks!
also current version is not lawful, (ap
should be derived from chain
). and in the PR i mentioned we would have lawful version of Free monad which should not have the issue as ap
would be derived from chain
and when you fold such structure chainRec
is used which must be stack safe.
even tho I would try to make sure Free applicative has no such issues.
Thanks! I've modified ap
and map
to use chain (based on purescript-free) and now the test pass, even thought it takes quite a lot of time to complete.
This should be fixed in recent dev
branch.
Also the FreeApplicative (Par) provided here is stack safe too.
Hi Safareli - thank you for your great work on Free. I've tried to base my ruby implementation on yours, and run into an issue with stack safety when using ap / foldMap.
Specifically: I've modified your 'Is stack safe' test:
Ends up in an error
RangeError: Maximum call stack size exceeded
whentimes
gets bigger. Will be looking at this more today.