Open
Conversation
There was a problem hiding this comment.
Pull request overview
Adds ReML support for explicit region/effect abstractions in type bindings by extending the parser/AST, elaboration, and type-function representations, along with new/updated explicit-region tests.
Changes:
- Extend the grammar and AST to carry explicit region/effect parameters on type bindings and constructed types.
- Update elaboration/type-function machinery to track ReML arity (region/effect var counts) and validate regvar usage.
- Add new explicit-region regression tests and expected outputs.
Reviewed changes
Copilot reviewed 29 out of 30 changed files in this pull request and generated 6 comments.
Show a summary per file
| File | Description |
|---|---|
| test/explicit_regions/ty1.sml | Updates type-binding syntax to include explicit regvar parameter sequences. |
| test/explicit_regions/expty3.sml | New test for region-abstract type declarations and application. |
| test/explicit_regions/expty3.sml.out.ok | Expected output for expty3.sml. |
| test/explicit_regions/err_ty2.sml | New negative test for repeated abstract regvars in type bindings. |
| test/explicit_regions/err_ty2.sml.log.ok | Expected error log for err_ty2.sml. |
| test/explicit_regions/err_ty3.sml | New negative test for free regvar in type binding. |
| test/explicit_regions/err_ty3.sml.log.ok | Expected error log for err_ty3.sml. |
| test/explicit_regions/err_expty4.sml | New negative test ensuring applied region-abstract type functions are tracked. |
| test/explicit_regions/err_expty4.sml.log.ok | Expected error log for err_expty4.sml. |
| test/explicit_regions/er18.sml.log.ok | Updates expected errors due to new regvar-seq validation. |
| test/explicit_regions/all.tst | Registers new tests in the explicit-regions test suite. |
| test/explicit_regions/Makefile | Updates test source list to include new explicit-region tests. |
| src/Parsing/Topdec.grm | Adds parsing support for regvar sequences in type bindings and prefix regvar type application. |
| src/Parsing/GrammarUtils.sml | Updates type traversal/rewriting to carry regvar lists on CONty and TYPBIND. |
| src/Manager/OpacityElim.sml | Adjusts synthetic TYPBIND construction for new regvar-seq payload. |
| src/Manager/FreeIds.sml | Updates free-id traversal to match new TYPBIND/CONty shapes. |
| src/Compiler/Lambda/CompileDec.sml | Updates constraint collection traversal for new CONty shape. |
| src/Common/TyName.sml | Extends TyName with ReML arity tracking and updates pickling. |
| src/Common/TYNAME.sig | Exposes arity_reml and updates freshTyName signature. |
| src/Common/STATOBJECT.sml | Updates TypeFcn API to include regvar parameters and ReML arity. |
| src/Common/ErrorTraverse.sml | Traverses new regvar-seq info and regvars in CONty. |
| src/Common/ErrorInfo.sml | Adds new error variants/messages for regvar-seq scoping/order and ReML arity mismatches. |
| src/Common/ElabDec.sml | Implements regvar-seq checks in type bindings and arity checks for regvar application. |
| src/Common/EfficientElab/StatObject.sml | Extends efficient TypeFcn/TypeScheme instantiation and equality to account for regvars. |
| src/Common/EfficientElab/Environments.sml | Updates TyName creation and primitive type function construction for new APIs. |
| src/Common/EfficientElab/ElabTopdec.sml | Updates where type elaboration / TyName creation for new APIs. |
| src/Common/ERROR_INFO.sml | Signature updates for new explicit-region error constructors. |
| src/Common/DecGrammar.sml | Updates AST representation, regvar collection, and pretty-printing for regvar-seq/type application. |
| src/Common/DEC_GRAMMAR.sml | Signature updates for the new typbind/CONty shapes and regvar collection API. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
This file contains hidden or 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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Add support for explicit region and effect abstractions in type bindings.