-
Notifications
You must be signed in to change notification settings - Fork 109
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Simplify binary lambdas with intermediate decls
We used to make a simplifying assumption that the binary lambda arguments to effect handlers have no decls in between the first and second lambda binder. However, it's been easy to violate that assumption, because inference likes to insert decls while unpacking patterns. This meant that accumulating over a monoid such as `AddMonoid Complex` caused a simplification error, because of `Complex` argument unpacking. This change relaxes the constraint slightly, to allow for the problematic decls. However, it's still not a complete solution as it assumes that the second binder and the eventual reconstruction don't depend on those decls. This seems sufficient for now and we can always revise that in the future.
- Loading branch information
Showing
2 changed files
with
24 additions
and
10 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