Skip to content
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

Make list-producing parsers tail recursive #21

Open
mlms13 opened this issue Sep 9, 2019 · 2 comments
Open

Make list-producing parsers tail recursive #21

mlms13 opened this issue Sep 9, 2019 · 2 comments

Comments

@mlms13
Copy link
Member

mlms13 commented Sep 9, 2019

I know there's a comment in the code, but I figured I'd open a more official ticket since this will probably become an issue in Relude CSV (since parsing an 8000 line CSV file doesn't seem completely out of the question).

I was looking at the MonadRec stuff in PureScript, and I think it's very similar to the trampoline technique that I was porting from Scala to Reason. I may try to do something in Relude proper, which hopefully relude-parse will be able to benefit from.

@andywhite37
Copy link
Member

andywhite37 commented Sep 9, 2019

Yeah, exactly - I left all that stuff kind of unimplemented, b/c it looked like if we had MonadRec, we'd be able to more easily re-work all this stuff to be tail recursive.

Once we get there, we should check all the recursive functions in relude-parse and attempt to make them all tail-recursive.

@andywhite37
Copy link
Member

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants