-
Notifications
You must be signed in to change notification settings - Fork 37
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Implement partial support for promoting scoped type variables
`singletons-th` can now promote a good number of uses of scoped type variables, save for the two exceptions now listed in the `singletons` `README`. This is accomplished by a combination of: 1. Bringing scoped type variables into scope on the left-hand sides of promoted type family equations through invisible `@` arguments when a function uses an outermost `forall` in its type signature (and does not close over any local variables). 2. Bringing scoped type variables into scope on the left-hand sides of promoted type family equations through explicit kind annotations on each of the type family's arguments when a function has an outermost `forall` in its type signature. 3. Closing over scoped type variables when lambda-lifting to ensure that the type variables are accessible when scoping over local definitions. See the new `Note [Scoped type variables]` in `Data.Singletons.TH.Promote.Monad` for more about how this is implemented. Fixes #433.
- Loading branch information
1 parent
7815a55
commit 965f1ae
Showing
17 changed files
with
1,037 additions
and
195 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
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
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
Oops, something went wrong.