Space leaks #64

Merged
merged 2 commits into from May 16, 2016

Projects

None yet

2 participants

@ndmitchell
Contributor

Two space leaks, squashed by using a strict accumulator.

ndmitchell added some commits May 16, 2016
@ndmitchell ndmitchell Fix space leak in indexInto
Classic foldl with a lazy accumulator. Alternatively, the entire `indexInto` function could be replaced with `Data.List.elemIndex`.
67eb423
@ndmitchell ndmitchell Fix spaceLeak in countConflicts
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.
5aa5807
@simonmar simonmar merged commit 62a88f7 into simonmar:master May 16, 2016
@erikd erikd added a commit to erikd/happy that referenced this pull request Sep 1, 2016
@ndmitchell @erikd ndmitchell + erikd Add a missing import following #64 6c39040
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment