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

Space leaks #64

Merged
merged 2 commits into from
May 16, 2016
Merged

Space leaks #64

merged 2 commits into from
May 16, 2016

Conversation

ndmitchell
Copy link
Contributor

Two space leaks, squashed by using a strict accumulator.

Classic foldl with a lazy accumulator. Alternatively, the entire `indexInto` function could be replaced with `Data.List.elemIndex`.
Using a `foldr` to do a summation, resulting in a space leak. Fixed by switching to `foldl'` and then forcing the elements inside the pair.
@simonmar simonmar merged commit 62a88f7 into haskell:master May 16, 2016
simonmar added a commit that referenced this pull request May 16, 2016
Add a missing import following #64
erikd pushed a commit to erikd/happy that referenced this pull request Sep 1, 2016
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.

2 participants