Skip to content

Conversation

@ocharles
Copy link
Collaborator

@ocharles ocharles commented Oct 26, 2021

This dramatically improves the performance of toScope, as previously toScope itself would go through bind, leading to quadratic performance.

Fixes #3

@ollef
Copy link
Collaborator

ollef commented Oct 26, 2021

I didn't quite understand how this fixes the performance issue, but I'm happy that it does. :)

I've given you access here and on Hackage in case you'd like to make a release.

Cheers!

@ollef ollef merged commit 01db7a7 into haskell-to-elm:master Oct 26, 2021
@ollef
Copy link
Collaborator

ollef commented Oct 27, 2021

Ah, I get it now: Since bind handles Globals, it needs to traverse more of the syntax, but in this case that is redundant.

@ocharles
Copy link
Collaborator Author

Yea, exactly that. I could never exactly figure out what bind was for (I don't use it at all in my generator, afaik), but this little manual definition seems to do the job nicely.

@ocharles
Copy link
Collaborator Author

I've given you access here and on Hackage in case you'd like to make a release.

Thanks, I'll cut a minor release with this change

@ollef
Copy link
Collaborator

ollef commented Oct 27, 2021

bind allows substituting globals (as well as variables) which is sometimes useful.

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

Successfully merging this pull request may close these issues.

Stack overflow when trying to construct a function with 13 arguments

2 participants