Closed Lupino closed 3 years ago
Likely lack of tco which i am battling through atm
Sorry I responded a bit to hastely from my phone this morning. Upon second reading it would seem you are experiencing the issue during compilation, meaning that we overflow stack while compiling. If you have pure-c checked out, you mind trying running the AST.everywhereM
and AST.everythingM
traversal functions through runTrampoline
? That would be the easiest win, otherwise maybe time has come to invest time to make these functions tail recursive.
more then 200 line will raise an RangeError
also raise a RangeError on compile Test/Data/Array.purs
Hm I can successfully compile it over here and run the purescript-arrays test suite. Are you able to identify whereabouts the problem is occurring?
Have you tried using latest master?
It is my mistake, now I can success compile the source。 I only update my macos version,and reinstall nodejs
Now it raise a range error, when I commit line
and recompile (just run make
)
I find RangeError
will occur on recompile
make clean
make # this compile will fine.
# edit the test/Test/Data/Array.purs
make # this time raise an RangeError
I can reproduce this but cannot explain why this is happening. It appears the stack overflow occurs trying to parse the corefn for these large modules. It's a riddle to me, however, why it would work after make clean
and only fail subsequently.
So, running the corefn parsing through trampoline solves the issue. However, it's currently not possible to evaluate F
to any other monad than Identity
. I've submitted a pull request to purescript-foreign that recovers this ability: https://github.com/purescript/purescript-foreign/pull/74. We'll have to see if it gets merged or not. For now, I simply changed the definition of ExceptT
to use Trampoline
in my local bower_components.... pretty messy.
when I compile https://github.com/pure-c/purescript-arrays/pull/1 test file cause an RangeError
https://github.com/pure-c/purescript-arrays/blob/master/test/Test/Data/Array.purs