Lower Effect Unit command entries through the existing closure - #140
Merged
Merged
Conversation
Source Effect stays abstract through type checking and Typed Core. P8 lowers it to the generic token closure from an explicit trusted contract, including checked WIT schemes and their source modules. A selected Effect Unit main runs once and returns 0; a trap propagates. Int mains and explicit runEffect stay available. Files with no selected main stay blocked, and the runtime denominator stays 413. The annotations scoreboard on 2026-10-04, Wasmtime 49.0.2, measures L6/M7 at 124/413. Those 124 files are the previous non-Int entries, and each exits 0. L1 through L5 are unchanged. Refs #78
A rank-1 effect import stored its binders on the wrapper and also left the leading ForAll in the declaration type, so Core rejected the duplicate quantifiers before CC. The wrapper now keeps the monotype. Optimization and effect lowering report a Core verification error against the module that error already names, including a foreign import's source module. Refs #78
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.
Summary
Effect aabstract through type checking and Typed Core, and lower it at P8 to the existing generic token closure. Trusted identities, checked WIT schemes, and their source modules are passed in explicitly.main :: Effect Unitruns once through an ordinary Core adapter and returns 0. A trap propagates.main :: Intand explicitrunEffectstay available. TherunEffectcheck is lexical: the selected entry may pass the runner to a helper.mainstay blocked. The runtime denominator stays 413.Measurement
PSRS_REQUIRE_WASMTIME=1 PSRS_ORACLE=annotations cargo test -p psrs-driver --test suite -- --ignored --nocaptureon 2026-10-04, Wasmtime 49.0.2,purs0.15.16:The 124 recovered files are the previous non-
Intentries. Each exits 0. The other 289 still stop earlier: 53 missing modules, 63 with no selectedmain, 86 at P3, 46 at P5 typecheck, 17 at P5 kind check, 14 at P8, 6 at P6, and 4 at P0.Local
cargo fmt --all --check,PSRS_REQUIRE_WASMTIME=1 cargo test --workspace, andcargo clippy --workspace --all-targets -- -D warningspassed.Closes #139
Refs #78