tobogganSe connecter

louise

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

M4: Core IR, lowering, and the reference interpreter — programs run

- tilc_core::ir: untyped A-normal-form Core (atoms, lets, tag/literal
  switches, closures, perform/handle), with a pretty printer.
- Lowering from typed HIR: dictionary passing from evidence (impls as
  dictionary functions returning method-closure tuples), closure
  conversion with capture chains, decision-tree match compilation
  (or-patterns, guards, literals, lists), irrefutable bindings, handlers
  as closures, generated derived Eq/Ord/Show, stubs for constructors,
  operations and externs used as values.
- Interpreter: trampolined tail calls (incl. through if/match), big-stack
  thread, a fiber per handler (corosensei) with fn/ctl/final ctl
  semantics, one-shot resume, forwarding, built-in externs (63-bit
  checked Int, Float, String, io, Ref, panic).
- tilc run [--interp] / tilc core; `main` validated (no params, only
  built-in effects).
- std: list, option, result, string modules; prelude panic and Show for
  List/Option.
- Type checker fix: recursive calls inside an inferred group now record
  evidence (their own dictionaries); inference-variable row tails are
  hidden in messages.
- tests/run harness (//> expected output, //! panic) with 8 programs;
  Core lowering snapshot; recursion evidence test.

Closes #6

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

olivier · il y a 1 mois · 0c9487b4b22aac4514c9f446210b79bcf64a72ee

Parents cb97530

32 fichiers modifiés, 3375 ajouts, 15 suppressions

Acrates/tilc_core/tests/lowering.rs+42−0
Acrates/tilc_core/tests/snapshots/lowering__core_of_a_small_program.snap+62−0
Mcrates/tilc_types/tests/evidence.rs+38−0