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.
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
There was a problem hiding this comment.
Pull request overview
Copilot reviewed 41 out of 42 changed files in this pull request and generated 1 comment.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
There was a problem hiding this comment.
Pull request overview
Copilot reviewed 41 out of 42 changed files in this pull request and generated 4 comments.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
There was a problem hiding this comment.
Pull request overview
Copilot reviewed 52 out of 53 changed files in this pull request and generated 5 comments.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
Add support for explicit region and effect abstractions in type bindings.