tobogganSe connecter

louise

Clone avec HTTPS, un jeton personnel en mot de passe, ou avec SSH, une clé ajoutée dans vos paramètres.

Lexically scoped effect handlers (ADR 0010)

An operation now goes to the handler visible where it is written, not
the innermost one at run time.

Types:
- Effect labels carry a hidden handler instance. `handle` and `region`
  create scoped instances, and a level-based escape check (E0703, and
  E0701 for regions) keeps them inside their scope.
- Operations resolve eagerly against the lexical capability environment.
  Calls use inclusion instead of row equality, so `mask` is no longer
  needed.
- Arrows declared in signatures get caller-supplied capabilities
  (`Bound`), received by lambdas checked against them.

Core and interpreter:
- Capabilities are values: functions and lambdas receive them, closures
  capture them, and `Perform` names its handler.
- The interpreter routes requests by frame identity. `main`, tests and
  actor bodies receive the root `proc` capability.

Docs: ADR 0010, plus notes in ADRs 0002, 0003 and 0008. ADRs 0001–0009
and the runtime ABI are marked accepted (issue #2).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

olivier · il y a 1 mois · cc5df232cda70be478f67abb224441dbfd884cf5

Parents e805f3f

26 fichiers modifiés, 1229 ajouts, 214 suppressions

Mcrates/tilc_core/tests/snapshots/lowering__core_of_a_small_program.snap+6−6
Mcrates/tilc_types/src/infer.rs+447−64
Mdocs/adr/0001-language-surface.md+1−1
Mdocs/adr/0006-incremental-model.md+1−1
Mdocs/adr/0007-type-inference-and-traits.md+1−1
Adocs/adr/0010-lexical-handlers.md+97−0