Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Improve definition of forever (#5205)
The previous implementation was: forever a = a >> forever a which can create a space leak in some cases, even with optimizations. The current implementation: forever a = let a' = a >> a' in a' prevents repeated thunk allocations by creating a single thunk for the final result, even without optimizations.
- Loading branch information
1 parent
53ed79a
commit f55f557
Showing
2 changed files
with
4 additions
and
23 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters