-
Notifications
You must be signed in to change notification settings - Fork 24
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Make sure default impls for BoundedEnum are TCO'd (#37)
The implementations for `defaultCardinality`, `defaultToEnum`, and `defaultFromEnum` don't trigger tail-call optimization, which means that they are quite a bit slower than they could be (and in some cases will produce a stack overflow when they needn't). This commit will also have the fortunate effect that this library won't break if the compiler stops inlining function composition in the (arguably broken) way that it does currently; see purescript/purescript#3439 (comment)
- Loading branch information
Showing
2 changed files
with
64 additions
and
9 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