Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
148 commits
Select commit Hold shift + click to select a range
c484d01
Vendor the v0.15.16 core libraries into the standard library
biuld Oct 4, 2026
74a9b02
Add compile diagnosis tooling and iteration workflow
biuld Oct 4, 2026
af2f5af
Add backend compile pass trace model
biuld Oct 4, 2026
1cb5e42
Ignore bound quantifiers when testing record layout dependence
biuld Oct 4, 2026
a0cedcc
Add optional CC and WAT dumps to the Wasmtime test helper
biuld Oct 4, 2026
e1ba35e
Skip compiler-provided modules when loading the vendored library
biuld Oct 5, 2026
447c4cd
Restore the workspace test suite after vendored-library slicing
biuld Oct 5, 2026
529de8e
Transport abstract constructor protocols through checked instantiation
biuld Oct 5, 2026
681d3f5
Support under-application of indirect callees
biuld Oct 5, 2026
ef1cc56
Establish the unified RuntimeRep and layout model (DEC-17)
biuld Oct 5, 2026
f0c5441
Carry checked evidence and policies through a Core-to-CC side table
biuld Oct 5, 2026
161de49
Provide Unsafe.Coerce.unsafeCoerce as a compiler primitive
biuld Oct 5, 2026
3a8815c
Make the effect token an opaque state token
biuld Oct 5, 2026
7081a65
Present the checked type relation as one entry with a variance
biuld Oct 5, 2026
aad64b9
Apply the official applied-variable rule to structural Eq and Ord
biuld Oct 5, 2026
f434ef4
Instantiate a bare class method's local constraints at its use
biuld Oct 5, 2026
6547252
Implement deriving with one identity registry, usage analysis, and al…
biuld Oct 5, 2026
faf85d4
Reuse the wrapped dictionary for derive newtype
biuld Oct 5, 2026
c7b0ef5
Lower record wildcards and backticked sections in source order
biuld Oct 5, 2026
2c4ffc0
Represent an applied foreign type as an erased reference.
biuld Oct 6, 2026
5493437
Lower an immediate underscore in if to a lambda parameter.
biuld Oct 6, 2026
d2cee0d
Expand local synonyms before checking an exported value.
biuld Oct 6, 2026
f69ae19
Parse a qualified name in backticks as one operator.
biuld Oct 6, 2026
c756e8d
Apply extra arguments to an expanded type synonym.
biuld Oct 6, 2026
3432987
Parse hexadecimal integer literals as signed 32-bit Int.
biuld Oct 6, 2026
74a0da8
Generalize local let constraints that one binding determines.
biuld Oct 6, 2026
64330c2
Keep outer locals polymorphic in guarded fallthrough.
biuld Oct 6, 2026
9ffa178
Lock an integer seed for a where-bound unfold stepper.
biuld Oct 6, 2026
0ace662
Match lexical dictionaries without choosing wanted types
biuld Oct 6, 2026
b674483
Provide equality ordering and display for library tuples
biuld Oct 6, 2026
e157505
Preserve quantified source types at coercion boundaries
biuld Oct 6, 2026
1485e7e
Scope quantified variables throughout checked binding implementations
biuld Oct 6, 2026
166f0f7
Preserve rank-N scrutinees across equation matching and guard fallthr…
biuld Oct 6, 2026
6cb619e
Register compiler interfaces and synthesize checked Symbol dictionaries
biuld Oct 6, 2026
a5c0525
Clean up compiler and test lint across all targets
biuld Oct 6, 2026
b926fb8
Restore official stdlib sources and preserve library foreign contracts
biuld Oct 6, 2026
dbfd2b7
Implement checked scalar stdlib bindings with official behavior evidence
biuld Oct 6, 2026
d52573f
Consume independent psrs-stdlib package and separate conformance tooling
biuld Oct 6, 2026
476675f
Implement polymorphic array application with checked callback invocation
biuld Oct 6, 2026
2a40764
Consume library-owned Node conformance tools and remove compiler copies
biuld Oct 6, 2026
53f133b
Implement stdlib array algorithms over checked storage primitives
biuld Oct 6, 2026
c35e1e9
Consume library array extend and update the stdlib lock
biuld Oct 6, 2026
acfd784
Consume library ST computations and update the stdlib lock
biuld Oct 6, 2026
88a5b2e
Track the evidence-free stdlib revision and stop tracking diagnosis s…
biuld Oct 6, 2026
0b9636c
Consume library uncurried functions and update the stdlib lock
biuld Oct 6, 2026
fdb9f8e
Consume library array operations and update the stdlib lock
biuld Oct 6, 2026
f2d4b0c
Land library reachability, local row instantiation and aggregate prot…
biuld Oct 6, 2026
d7af514
Report ScopeConflict for a duplicated import qualifier
biuld Oct 6, 2026
dc82948
Move module roots into mod.rs for the source-layout rule
biuld Oct 6, 2026
f9445fc
Adjust tests to the migrated standard library
biuld Oct 6, 2026
3e78ff1
Preserve canonical aggregate protocols across WIT variant payloads
biuld Oct 6, 2026
df3626e
Keep local bindings monomorphic through declaration ambiguity checks
biuld Oct 6, 2026
4e85c35
Check bare row arguments through the shared instantiation relation
biuld Oct 6, 2026
d74e092
Land unified target linking for the formatter slice
biuld Oct 6, 2026
129e6e3
Measure the runtime stack bound and check artifact reproducibility
biuld Oct 6, 2026
f1fe2d0
Broaden the compiler-side Show boundary evidence
biuld Oct 6, 2026
3ede633
Compose pinned guest interfaces through checked target plans
biuld Oct 6, 2026
7448cd7
Resolve shared qualified imports by canonical declaration identity
biuld Oct 7, 2026
5394cfc
Avoid unused guard continuations and pin checked Bounded values
biuld Oct 7, 2026
b197f3d
Terminate recursive product coverage and record stdlib acceptance
biuld Oct 7, 2026
e730c1b
Pin scalar String slicing with projected FFI and runtime evidence
biuld Oct 7, 2026
7167527
Guard deep expression walks and consume intrinsic spines
biuld Oct 7, 2026
cd32f39
Pin scalar String character indexing and conversion
biuld Oct 7, 2026
366a108
Pin strict Int parsing and corrected quotient ownership
biuld Oct 7, 2026
5b72ee6
Pin radix Int formatting and shared decimal conversion
biuld Oct 7, 2026
78dfeef
Pin checked Number-to-Int conversion and boundary evidence
biuld Oct 7, 2026
820de13
Support Number truncation and pin official Int wrapper behavior
biuld Oct 7, 2026
660d1c5
Support checked Number rounding and pin official public wrapper behavior
biuld Oct 7, 2026
a3ea5e8
Preserve explicit polymorphic arguments in checked Core instantiation
biuld Oct 7, 2026
131a1fe
Support checked decimal conversion and official Number parsing behavior
biuld Oct 7, 2026
b263b14
Implement checked Number absolute value with public behavior evidence
biuld Oct 7, 2026
0aab025
Separate intrinsic semantics from target implementations
biuld Oct 7, 2026
b300392
Support checked Number square root with public behavior evidence
biuld Oct 7, 2026
450759c
Support checked Number inverse cosine with public behavior evidence
biuld Oct 7, 2026
957b133
Support checked Number inverse sine with public behavior evidence
biuld Oct 7, 2026
e8b5b9a
Support checked Number inverse tangent with public behavior evidence
biuld Oct 7, 2026
4e53f83
Support checked Number four-quadrant inverse tangent with public beha…
biuld Oct 7, 2026
d623322
Support remaining Number primitives with upstream libm
biuld Oct 8, 2026
eb9f86a
Check driver regression contracts before optimization
biuld Oct 8, 2026
d89c870
Pin stdlib with remaining Number math bindings
biuld Oct 8, 2026
9da4fd1
Replace synthesized realloc with a checked runtime allocator
biuld Oct 8, 2026
a805258
Introduce generic State primitives and runtime externals
biuld Oct 10, 2026
ba2c6e2
Track checked State dependencies in Core
biuld Oct 10, 2026
c3380cb
Add an independent runtime GC storage provider
biuld Oct 10, 2026
12fe6bb
Assemble checked Core and world boundaries in the linker
biuld Oct 10, 2026
aec55c1
Project checked State dependencies through CC, MIR and Wasm
biuld Oct 10, 2026
4fcc985
Run library-owned effects through the driver and CLI
biuld Oct 10, 2026
6b40b8d
Record public Effect.Ref reference adapter evidence
biuld Oct 10, 2026
3d345d3
Checkpoint library-owned Effect and State migration work
biuld Oct 11, 2026
e806616
Remove compiler-owned Effect and State mechanisms
biuld Oct 11, 2026
395ccba
Use unsigned wasm32 allocator operands and separate artifact builds
biuld Oct 11, 2026
e7e250c
Support ordinary runtime storage bindings
biuld Oct 11, 2026
981c832
Document draft library-owned effects and native Effect/ST handlers
biuld Oct 11, 2026
34cb5f8
Record the runtime and storage binding continuation
biuld Oct 11, 2026
867b42e
Select compiler-generated frames for generic effect handlers
biuld Oct 11, 2026
a3c4f14
Split delimited control out of the effects design and fix its scope
biuld Oct 11, 2026
251352a
Design the delimited-control mechanism: frames, executor, and handlers
biuld Oct 11, 2026
1633dd8
Add the compiler-owned delimited-control surface (Prim.Control)
biuld Oct 11, 2026
64a27de
Lower Control frames and the return path of the executor
biuld Oct 11, 2026
d8fc250
Thread generated-function signatures through CC lowering
biuld Oct 11, 2026
2026238
Record the delimited-control lowering handoff
biuld Oct 11, 2026
1bcad5a
Implement persistent control executors and open handler forwarding
biuld Oct 11, 2026
a31ba11
Enforce resumption ownership and delimiter lifetime
biuld Oct 11, 2026
95982be
Record public control validation and clause scope gap
biuld Oct 11, 2026
bdaf0cf
Implement typed control elimination with scoped handler contexts
biuld Oct 11, 2026
5c78fa7
Preserve control machine field representations through CC and MIR
biuld Oct 11, 2026
d2125f5
Preserve nominal control types across helper calls and captures
biuld Oct 11, 2026
148e706
Verify local closure capture contracts through MIR erasure
biuld Oct 11, 2026
2e88d65
Measure control extent ancestry and retained heap under long requests
biuld Oct 11, 2026
57e9425
Retain checked control domains through CC and MIR lowering
biuld Oct 11, 2026
df46f2d
Bind control machine calls to predeclared semantic helpers
biuld Oct 12, 2026
35dbdf9
Verify finish extent and restoration ownership across CC and MIR
biuld Oct 12, 2026
f3c5a13
fix(backend): retain nominal control carriers at source boundaries
biuld Oct 12, 2026
f9e9e14
fix(backend): verify raw resumption checkpoint ownership
biuld Oct 12, 2026
b2dd647
fix(backend): verify saved finishes and fresh replay activations
biuld Oct 12, 2026
5b74e43
fix(backend): verify completion contexts and replay ancestry flow
biuld Oct 12, 2026
a9d8784
refactor(backend): group control contracts and verifiers by stage
biuld Oct 12, 2026
7789c5c
fix(backend): verify source context construction and entry
biuld Oct 12, 2026
7a6dae8
fix(backend): verify control root initialization and normal cleanup
biuld Oct 12, 2026
3d320e2
fix(frontend): accept qualified constructor operator chains
biuld Oct 12, 2026
c35d4ef
fix(typecheck): improve recursive instance context constraints
biuld Oct 12, 2026
d66bb29
Migrate Effect fixtures to the official module and pin the restored s…
biuld Oct 12, 2026
e5c54d3
fix(backend): lay out uninhabited data types as erased references
biuld Oct 12, 2026
a2fb20c
fix(frontend): desugar local signature types and resolve ~> through i…
biuld Oct 12, 2026
7a74253
fix(typecheck): predeclare annotated local bindings at their written …
biuld Oct 12, 2026
34a1290
fix(backend): do not treat an uninhabited field as a complete signature
biuld Oct 12, 2026
06f8e79
test(effect): prototype the rank-N heterogeneous native representation
biuld Oct 12, 2026
40cc00c
fix(resolve): require visible aliases for symbolic type operators
biuld Oct 12, 2026
92ac174
test(effect): observe both heterogeneous storage results
biuld Oct 12, 2026
d5dfbb9
Land labelled Control row wrappers and align the control design
biuld Oct 12, 2026
6703863
Normalize higher-order synonym applications before saturation and ela…
biuld Oct 12, 2026
d2d489f
Refine superclass row contexts through semantic dependency improvement
biuld Oct 12, 2026
6df8bfb
Complete Run and Free source migration with recursive closure adaptation
biuld Oct 12, 2026
1e24e5d
Verify delimited control machine paths and lifecycle bodies
biuld Oct 14, 2026
01f7e66
Name the control machine schema and record the construction boundary
biuld Oct 14, 2026
708d65a
Build the control machine from checked plans and retire its recognizers
biuld Oct 14, 2026
f6c87bc
Complete checked-plan construction and delimited-control acceptance
biuld Oct 15, 2026
bca4fea
Give native Effect/ST a phantom-result free representation
biuld Oct 15, 2026
886cd82
Pin the native Effect/ST package and record its acceptance
biuld Oct 16, 2026
dce30d8
Record the 2026-10-17 official-suite scoreboard
biuld Oct 16, 2026
aa44bee
Format the coerced-ref rejection test
biuld Oct 16, 2026
ff8618d
Keep native oracle fixtures inside the compiler crate
biuld Oct 16, 2026
3f53b92
Check out the locked standard library in CI
biuld Oct 16, 2026
de0db32
Run the linked seed guest with unsafePerformEffect
biuld Oct 16, 2026
5f36c77
Satisfy the Rust source layout check
biuld Oct 16, 2026
eb7ff2b
Import Effect and run command entries through the prelude
biuld Oct 16, 2026
3d85733
Run the Wasmtime suite once per pull request
biuld Oct 16, 2026
d68779c
Find the residual dictionary on the declaration named f
biuld Oct 16, 2026
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
19 changes: 19 additions & 0 deletions .github/workflows/required-wasmtime.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ name: Required Wasmtime execution

on:
push:
branches: [master]
pull_request:

jobs:
Expand All @@ -11,6 +12,24 @@ jobs:
PSRS_REQUIRE_WASMTIME: "1"
steps:
- uses: actions/checkout@v4
- name: Read the locked standard-library revision
id: stdlib-lock
run: |
revision=$(python3 -c 'import json; print(json.load(open("stdlib.lock.json"))["revision"])')
echo "revision=$revision" >> "$GITHUB_OUTPUT"
- name: Checkout the locked standard library
uses: actions/checkout@v4
with:
repository: biuld/psrs-stdlib
ref: ${{ steps.stdlib-lock.outputs.revision }}
path: psrs-stdlib-checkout
ssh-key: ${{ secrets.PSRS_STDLIB_DEPLOY_KEY }}
- name: Place the package where the lock expects it
run: |
dest="$GITHUB_WORKSPACE/../psrs-stdlib"
rm -rf "$dest"
mv "$GITHUB_WORKSPACE/psrs-stdlib-checkout" "$dest"
test -f "$dest/manifest.json"
- uses: dtolnay/rust-toolchain@stable
- name: Install pinned Wasmtime
run: |
Expand Down
17 changes: 17 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -3,3 +3,20 @@
.DS_Store
node_modules/
dist/

# Raw diagnosis snapshots are local, machine-specific and regenerable.
diagnose.json

# Generated stdlib diagnosis, oracle and runtime reports stay local.
/docs/implementation/stdlib/**/diagnosis.json
/docs/implementation/stdlib/**/next-blocker.json
/docs/implementation/stdlib/**/run.json
/docs/implementation/stdlib/**/validation.json
/docs/implementation/stdlib/**/observations.json
/docs/implementation/stdlib/**/*-run.json
/docs/implementation/stdlib/**/diagnosis-checkpoints.json
/docs/implementation/stdlib/**/import-summary.json
/docs/implementation/stdlib/**/summary.json

__pycache__/
*.egg-info/
46 changes: 46 additions & 0 deletions AGENTS.md
Original file line number Diff line number Diff line change
Expand Up @@ -19,8 +19,45 @@ uncommitted work.
- For a new user-facing feature, maintain the relevant feature and design
documents under `docs/`. Add a decision record only for a major, durable
decision. Keep documentation proportional to the change.
- For compiler fixes, follow the [compiler iteration SOP](docs/workflow/compiler-iteration-sop.md)
to capture a comparable baseline, locate the owning stage contract, and verify
the change at the right layer.
- Review the local diff and run the validation relevant to the files changed.

### Standard-library package

- Keep official library sources and case data in the independent `psrs-stdlib`
repository. The compiler consumes `stdlib.lock.json`; use `PSRS_STDLIB_ROOT`
only for an explicit development package.
- Follow [the stdlib source-fidelity contract](docs/workflow/stdlib-vendoring.md)
when importing or changing official library sources.
- Pin upstream package versions and commits. Preserve official pure functions,
signatures, exports, classes, instances, and modules. Repair compiler defects
in the compiler rather than editing valid official source to compile.
- Official vendored `.purs` files retain their original length, including files
above 500 lines. The 500-line limit still applies to maintained compiler and
tooling source; do not split or rewrite official library modules to meet it.
- Differences require a concrete Wasm/WASI or DEC-16 representation reason,
an explicit implementation boundary, and focused behavior evidence. A compiler
limitation, reduced API, or convenient rewrite is not a target justification.
- Never replace an unimplemented foreign value with recursion, a fabricated
result, or another successful-looking placeholder. Keep its source contract
and report missing target support explicitly.
- Compile acceptance, source fidelity, and runtime correctness are separate
claims. Importing every module with an unused `main` does not prove that the
APIs execute, that every declaration survives backend lowering, or that FFI
behavior agrees with its contract.

- Prefer small checked runtime/storage primitives and ordinary target library
wrappers. Keep stdlib algorithms, traversal order, and callbacks in
`psrs-stdlib`; missing JS FFI alone does not justify a whole-function intrinsic.
Validate primitive values at their checked use types before ABI erasure;
copying a polymorphic array argument cannot preserve an in-place write.
- Use the library-owned Node [conformance commands](docs/workflow/stdlib-conformance.md)
in `psrs-stdlib/tools/` for source and runtime comparisons. Maintain tool code
and case engines in that repository; keep compiler locks and Rust tests here.
The tool consumes executable and package paths; it must not depend on compiler-internal representations.

### Commit granularity

- Group a commit by topic, not by file type. Code, tests, and the design or
Expand Down Expand Up @@ -104,6 +141,10 @@ as project fields would create a second source of truth.
- New syntax and new diagnostics land with official-suite evidence, not only a
local test. The issue states whether that is a `purs` differential case or a
scoreboard number.
- Before a broad compiler fix, record a small or filtered compile-diagnosis
baseline and inspect the first blocker, diagnostic origin, and last completed
stage. Use the SOP's failure-group counts to guide investigation, while
choosing roadmap work and semantic ownership by the rules in this section.
- Run the issue's `Validation` block. It is the issue-specific superset of the
workspace validation below.

Expand Down Expand Up @@ -239,6 +280,11 @@ cargo test --workspace
cargo clippy --workspace --all-targets -- -D warnings
```

An explicit user-defined validation scope takes precedence over these
defaults. An issue's `Validation` block adds its required checks to the
applicable defaults. Report omitted commands and their scope; do not present
unrun checks as passing.

The workspace default member is the CLI so `cargo run -- ...` works from the
repository root. Always use `cargo test --workspace` to include library tests.

Expand Down
Loading
Loading