tobogganSe connecter

louise

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

M2 step 2: type checker — HM inference, signatures, records, traits

- tilc_types: union-find unification with rigid signature variables;
  SCC-ordered inference and generalization of unannotated top-level
  functions (local lets monomorphic); annotated functions checked
  against rigid signatures; expectations pushed into lambdas, block
  tails and branches; Never coerces at checking sites only.
- Records: labelled arguments, field access on single-constructor
  types, record update; constructor patterns with labels and `..`.
- Traits: single-parameter, Haskell98 impl shape, coherence (no
  duplicates, no orphans), operator constraints (Eq/Ord/Num), impl
  method checking, @derive(Eq, Ord, Show), solver producing evidence
  trees (dictionary elaboration plan for M4).
- Type aliases with arity checks and cycle detection.
- UI test harness (tests/ui, //~ ERROR / //~ TYPE) with inference,
  signature, record, trait, Never and soundness suites; evidence tests.
- ADR 0007 (proposed, needs engineering review); codes E0201-E0411.

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

olivier · il y a 1 mois · baca1e58528fc1068c12913d7d3c10759262d9c8

Parents 1d70fc2

20 fichiers modifiés, 3245 ajouts, 0 suppressions

Acrates/tilc_types/src/traits.rs+167−0
Acrates/tilc_types/tests/evidence.rs+90−0
Adocs/adr/0007-type-inference-and-traits.md+70−0