Skip to content

Lower Effect Unit command entries through the existing closure - #140

Merged
biuld merged 2 commits into
masterfrom
fix/effect-command-entry
Oct 4, 2026
Merged

biuld merged 2 commits into
masterfrom
fix/effect-command-entry

Conversation

@biuld

@biuld biuld commented Oct 4, 2026

Copy link
Copy Markdown
Owner

Summary

  • Keep source Effect a abstract 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.
  • A selected main :: Effect Unit runs once through an ordinary Core adapter and returns 0. A trap propagates. main :: Int and explicit runEffect stay available. The runEffect check is lexical: the selected entry may pass the runner to a helper.
  • Files with no selected main stay blocked. The runtime denominator stays 413.

Measurement

PSRS_REQUIRE_WASMTIME=1 PSRS_ORACLE=annotations cargo test -p psrs-driver --test suite -- --ignored --nocapture on 2026-10-04, Wasmtime 49.0.2, purs 0.15.16:

Board Result
L1 904/908
L2 failing 72/72
passing resolved 270/413
L3 35/48
L4 35/50
L5 53/80
L6/M7 124/413

The 124 recovered files are the previous non-Int entries. Each exits 0. The other 289 still stop earlier: 53 missing modules, 63 with no selected main, 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, and cargo clippy --workspace --all-targets -- -D warnings passed.

Closes #139

Refs #78

biuld added 2 commits October 4, 2026 16:10
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
@biuld
biuld merged commit 2f47291 into master Oct 4, 2026
2 checks passed
@biuld
biuld deleted the fix/effect-command-entry branch October 4, 2026 08:56
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Effect lowering contracts and Effect Unit command entries

1 participant