Skip to content

Complete generic specialization, variance checks and effect propagation - #237

Merged
MelbourneDeveloper merged 10 commits into
mainfrom
fixes
Sep 10, 2026
Merged

MelbourneDeveloper merged 10 commits into
mainfrom
fixes

Conversation

@MelbourneDeveloper

Copy link
Copy Markdown
Collaborator

TL;DR

Complete explicit generic calls and specialization in both flavors, preserve generic callback/effect contracts, and report provably redundant type annotations.

Details

What Was Added

  • Call-site type arguments (identity<int>(5) / identity<int> 5), AST/parser support, per-call substitutions and generic field/callable constraints.
  • Inference-based annotation warnings in the CLI and LSP. The reported set is removable together; ML headers retain their curried shape, and compiler-supplied module constraints are excluded.
  • Generic application, variance, effect-transport and storage-injection regressions; shared AST/test helpers; stricter Rust/TypeScript unused-code checks and a product-reference dead-code gate. No dependency additions.

What Was Changed/Deleted

  • Preserve specialization and callback provenance through aliases, returned closures, record fields, named/curried calls and handlers. Deferred dotted calls retain only the selected callee's constraints and effects; builtin shadowing follows the actual binding.
  • Preserve semantic generic-record metadata and argument order through function-value and extern calls. Channel-in-generic-field and recursive-specialization fixtures now assert successful execution and nested values.
  • Validate explicit type/effect argument arity, nested types and binder ownership. ML permits keyword spellings in effect-operation name positions; Default accepts the documented handle … do spelling.
  • Consolidate compiler traversals, target validation and test assertions, remove unused wrappers/obsolete launcher scripts, and install the CI-pinned Deslop version from make setup.

Spec/Doc Changes: Update syntax, type, call, effect, ML, concurrency and builtin contracts; document exact leaves under variance, annotation-warning semantics, storage injection and plan 0015's validation results.

Breaking Changes: Yes for compiler Rust API consumers: Expr::TypeApply adds an enum variant, and DocComment::summary_only / osprey_syntax::dependency_sets are removed in favor of DocComment::new / dependency_report. CLI warnings add stderr output without changing exit status; invalid generic applications and unhandled callback effects are rejected.

Related: #160, #201, #227.

How Do The Automated Tests Prove It Works?

  • a_written_type_argument_pins_an_instantiation_end_to_end and the_ml_written_type_argument_prints_the_same_bytes exercise both surfaces; arity/contradiction fixtures pin rejection diagnostics.
  • the_three_markers_agree_on_every_assignment_outcome pins exact constructor leaves. higher_order_invocation_retains_named_and_curried_arguments, named_function_value_calls_bind_written_slots_before_callback_substitution and escaped_closures_capture_values_but_never_active_handler_bindings cover effect transport and handler escape.
  • the_reported_set_is_deletable_as_a_whole_not_only_one_at_a_time verifies joint annotation removal. CLI/LSP tests pin warning text, severity, source ownership and ranges.
  • make ci passes: 1,563 Rust tests, all nine configured Rust coverage gates, 24 C suites/29 coverage gates, 213 native goldens plus 18 alternate GPU checks per allocator, zero ARC leaks, 316 extension tests and 17 bank browser tests. Types coverage is 10028/10231 lines against 98%; pinned Deslop is 4.2% against 5%.
  • Additional recorded validation passes on Linux, iOS, Android and Wasm, plus 107 website tests, Docker API checks, VSIX packaging, 129 callback/argument-order runtime checks and 1,278 identical compiler-output comparisons. Hosted checks must validate this submitted revision.

@MelbourneDeveloper
MelbourneDeveloper enabled auto-merge (squash) September 10, 2026 08:28
@MelbourneDeveloper
MelbourneDeveloper merged commit 8792de9 into main Sep 10, 2026
14 checks passed
@MelbourneDeveloper
MelbourneDeveloper deleted the fixes branch September 10, 2026 08:42
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.

1 participant