BREAKING: a trait method's name is reserved — A TOP-LEVEL fn whose name is a method of a trait the program implements or derives is now a compile error (a MODULE-LEVEL fn too, but only where its own file names the method bare at a site dispatch could claim — see part (5)), 'show' is a method of trait 'Show' (derived in main.hly); rename the declaration or drop the clause (ResolveError::TraitMethodNameTaken), reported at the declaration. The rule, in its four parts: (1) triggered by a written trait X for T impl or a deriving (X) clause at a unit's file top level — a module-level or block-nested clause is not a trigger; (2) taken by name, at any type and any arity; (3) checked in every unit the clause's unit reaches along its import and run closure, outward and transitively — never in its callers and never as a workspace-wide union, so an unimported module file's declarations are unaffected; (4)declarations only — a top-level or module-level fn declaration only: every BINDING form shadows a trait method instead, and the reference means the binding. A let, a nested fn, a parameter, a lambda parameter and a case binder all bind, and a task expecting field is accepted too — though NOT shadowed correctly, in either of two ways: a field named like a derived method is displaced by the method and the program dies at run time (debt #903, pre-existing — the same probe fails identically at this plan's fork point), and where the same file ALSO declares a module member of that name the program is rejected instead, with a TraitMethodNameTaken pointing at the member rather than at the field (debt #898). SYNTAX.md section 3 names four of those forms for shadowing a FUNCTION (a let, parameters, lambda parameters and case binders); the nested fn and the task field are this rule's own additions, so the whitelist is six kinds and not "the five forms section 3 names" — though only FIVE deliver the shadowing: the task field is the exception named above. (5) A MODULE MEMBER is not reserved where its only use form is qualified (M.show), only where the name is called bare at a site dispatch could claim — which an import M exposing show IS, written in any unit the same trigger reaches, and which a bare name the unit's own binder owns is NOT. import M exposing .. counts the same way, but only for a name the module itself EXPORTS; an importer outside the trigger's reach counts for nothing. The unit is the FILE, so an inline module block shares its file's. REVISED 2026-11-06 by this plan section 5b: this clause and the headline above said "declaration", which rejected a let and a nested fn as well. The six builtin method names (eq, compare, show, toRational, fromInt, hash) are reserved, and user-defined trait methods are reserved too. A program with no trait and no deriving clause is completely unaffected — that is what keeps let eq = 1 == 1 and a plain fn show legal. Previously such a declaration compiled and was then silently displaced at run time (a deriving (Show) unit's fn show was never called).
Declaration identity is authoritative for types and dispatch — A name occurrence's type now comes from the declaration it resolves to (DefId), via the identity-keyed Scope::decl_types/occurrence_type for values and function_impls' per-entry DefId for functions, with the name-keyed Scope::vars as the explicit answer for the populations that have no identity by construction AND for every non-local function-name occurrence -- a top-level or module-level fn answers from vars even where the identity table holds its scheme (revised 2026-11-06: this clause said "only for the populations that have no identity by construction", which the plan section 16 M32 and M33 figures refute). The positional overload_index field and the (Some(idx), _) register arm are deleted; codegen reads the typed AST's resolved_def/selected_def. Value binders shadowing a function are ranked candidates in visible_homographs (candidacy replaces declination at the typing gates).
Type checking
One checking judgement for every declared type — A declared type is now checked in type inference by one relation instead of by several comparators spread across inference and code generation. check pushes the declared type into a value's parts (branches, a block's result, list, tuple and record literal parts, constructor fields, a lambda body), so a mismatch is reported at the part that breaks it rather than at the whole value; subsume is the relation with effects (a metavariable plan 241 may not decide yet is deferred, any other is unified) and fits is the same relation without them. The context-free types_compatible keeps only its leaf policy and the overload-ranking adaptations; are_types_compatible, infer_type_with_expected, declared_return_admits_body and declared_return_admits_open_body are deleted, and code generation no longer re-checks annotations or declared returns (50adbcf, 00e9f39)
BREAKING: a type mismatch names the promise it broke — TypeMismatch's function_signature and context fields are replaced by one site: Option<Box<CheckSite>>, and RigidTypeMismatch gains a site too. A CheckSite is the declared return, an annotation, an argument, a constructor field, a record update, an impl method, a handler arm, a resume, a task's expecting record, or a non-site cause (literal representation, the ? operator). It renders as the diagnostic's second line, for example required by the declared return of `f` or required by the declared type of argument 2. TypeError::ReturnTypeMismatch and its error code are removed (e6eb0bc, 465d1d3, 3773e3a)
Declared returns are checked in inference — Every fn, nested fn and module fn body is checked against its declared return with the declared letters rigid. The declared type is pushed into Ok/Err/Just payloads, constructor fields, branches and literal parts, and a part that breaks it is reported there; the whole body is still compared once inference ends unless a fault inside it was already reported (a46e982)
A type letter in an annotation is rigid — A letter a let annotation leaves free is a rigid variable of the binding's value, a letter written in a lambda parameter's annotation belongs to that lambda (so the lambda is polymorphic in it), and a trait method's own letter (not a trait parameter) is rigid in every impl, so an impl body that fixes it is a RigidTypeMismatch. A written Unit is () unless the program declares its own Unit. Before, an annotation whose letters the value fixed was accepted, and the program could return a value of the wrong type at run time (debts #273, #515, #689) (82a915c, cbfb338, 79dfaf5, e220b7b)
An argument's mismatch is reported at the part that breaks it — An argument the call's unifier refuses is related by the checking relation, and a parallel descent of the argument, its type and the parameter type reports the mismatch at the first tuple part, record field or Just/Ok/Err payload that disagrees. A record variant's fields are related at one instance of the enum's parameters, so a field that breaks a shared parameter is reported at that field rather than as the whole record (0688a9c, a3e96da)
A record update cannot add a field — Updating a field the base's closed or rigid row lacks is now a type error reported at the update (TypeMismatch, or RigidTypeMismatch naming the rest's letter), and an update's new value meets the field's type through the checking relation (debts #520, #784) (460e1b7)
Handler arms and resume are checked against the operation — A tail arm's body and a resume's value are checked against the operation's result type, with the operation's own letters rigid in the arm; a user enum named in the result is that enum, and a program's own Unit is not (). A ctl arm's value meets the handle's answer type, and CtlArmMustResume is now reported by inference, once per arm. resume "s" for an operation returning Int is a TypeMismatch at the resume (debts #516, #608, #617, #643, #249) (ce9d811)
A task's exposing and expecting records are checked in inference — Each exposed binding is read at its exposing type once the task's types settle (an Int widens to a Float, a contract frame must hold its promised columns), and a run's input meets the child's expecting record in inference, with the child's own aliases expanded. A run child's verdicts are reported at each call site. validate_task_outputs and the comparator calls in compile_run_file are deleted (d22378c)
A user enum's unused type parameter generalises — A type parameter no field of a user enum's variant mentions is now a fresh type variable rather than Unknown, so a let bound to a nullary variant generalises it (Opt::Non is forall a. Opt a). The built-in Maybe and Result constructors keep their previous behaviour for now (debts #182, #1038) (6467b8e)
Effects
BREAKING: a written effect row is a contract at a call — A row arriving through a call is now the same demand as an operation performed directly, so an unhandled top-level call of fn f : Int ->{Log} Int is a compile error at the call instead of a VM abort with no span. The same call under a covering handle is clean, and an alias (let g = f) carries the row. A declaration that over-declares a row it discharges itself must declare its honest row (debt #851) (04c0cfd)
A written callback slot is a claim the callee answers for — Where a parameter's arrow carries a row the user wrote and closed, the caller is no longer charged the argument's row a second time, so a combinator that runs its callback under its own handler can be called from a pure function. The claim is judged by the effect solver only where the callee resolves to a declaration it checks, per arrow, with a resolved identity deciding alone and aliases followed; a bare or open-tailed slot keeps the conservative charge, and a dishonest callee is still caught at its own declaration (debt #1002) (7bee982, 6c7a928, a9a571c, 0ae3f3d)
An inline callback is judged like a named one — A closure literal passed for a written slot now gets a call edge of its own, its effects are attributed per arrow (a multi-parameter lambda's body charges its last arrow, a returned closure the arrow whose application runs it), and every arrow that charges a label must admit it. Before, the inline spelling of a callback was rejected or accepted differently from the identical named fn (debt #1016) (226a828, 23444b5, fd77252, 81c2c37, eaf6e60, 11cbff7, 3c3ab16, 6495078)
✓Fixed
20 items
A parameter or task field named like a trait method runs — fn apply show = show + 1 inside a unit with deriving (Show) used to dispatch to the synthetic impl and die at run time with a Closure type mismatch; dispatch now declines the trait path when the occurrence resolves to a binder (Param/LambdaParam/CasePatternVar/TaskParam).
A REPL cell keeps the parser's namespace, so type annotations keep their names (bugreport 57) — db::eval_cell stored each cell's new parser state but never installed its string interner into the compiler's parser_interner, which every pipeline::compile* entry point does. RowTy::re_intern therefore resolved the annotation's field ids against an empty interner and fell back to unwrap_or(""), silently renaming every declared name to the empty string.
Type checking
Annotations nested in records, tasks and lambdas stay rigid — A letter in a record annotation ({ f : (a -> String) } with { f = |x| x }) and a task exposure (let f = |x| x exposed at Int -> String) were each read as a wildcard and the program ran; both are checked as one instance now. A let nested in another lambda generalises again, as its unannotated twin does; an operation's letter escaping into an outer variable is an Escape report, reported once (d56f182, 1624e0c, 57a245d, bde9355)
A value-label contract meets the enum it labels — The effect-free fits relation lacked the stdlib adaptation the context-free comparator carried, so a ValueLabelContract was refused against its enum (e005e3b)
Effects
Deep and multi-parameter closure chains — A level of a returned closure chain is its body and carries its own parameter count, so |a b| e is one level and two arrows in every reader (the declaration lane, the annotated-let lane, the literal lane and the edge lane). Walks past the arrow bound no longer truncate silently: a deeper perform is charged rather than dropped, a cover rule does not read a truncated domain, and a slot-violation diagnostic names the union of the unread arrows' labels instead of ->{} (debts #1017, #1018) (f9e47b0, ca2cb9a, 2d4dc4f, 786627d, dd591dd, 910cecb, 470ca72, 752b721, f82b447, 00d0286, 28999a1)
The stdlib boundary is decided by the callee — A user effect that shares a name with an ambient label (effect IO) no longer makes IO.println demand a handler for the user's operation; the exemption is granted to a call of a stdlib export, decided by what the call resolved to rather than by its spelling, so an inline module Math that shadows the stdlib's is the user's module. A native's exempt charge no longer masks a user charge of the same label, and an anonymous diagnostic names a user-declared operation in preference to a bridged one (debts #878, #1023) (d2808c8, c032135, e5645e1)
Top-level bindings are charged where they run — The top level is a unit of the effect solver, and a top-level let is a unit it can name, so let f = mk 1 then f 2 at module level reports like its twin inside a fn. A let whose value still holds an arrow is charged at its uses, a fully applied call at its binding, and a partial application performs nothing where it stands; a let that shadows a fn is charged for what the let holds, and let g = mk inherits what mk returns (debt #1024) (299bb58, 8e68cb6, 90653ad, ce52e7d, a1a5cc6)
A destructuring let charges each binder for its own part — One recursive walk pairs each binder with the part of the value it takes, through literals, as patterns, choices (if, case), blocks that bind helpers first, names of earlier bindings, projections, record updates and spreads, list indices, cons and list patterns and handled values. What the pairing steps over is still charged where it is evaluated: a choice's condition, a scrutinee, a guard, a block's other statements, a record field the pattern omits and an overridden write. The pure half of a mixed tuple stays pure, and a nested fn or a module member's fn is a unit of the solver. The walk is memoised and its answer is a set, so chained bindings no longer cost exponential time (debts #1027, #1028, #1031, #1032, #1036) (5fc249f, e367d89, 4738a99, 290c3a6, 35c2bad, 00984e0, f1d59cb, 759ef75, 98b793f, ca30ec2, ddf6541, 819bfbd, 4ef20a1, fbed442, eaeeb62, a691042, 906be67, a727b7a, 27f5f63, 8267391, 4d8f9b9, 0358c75, a4483ea, 299075a, e535611, deaf18b)
A container carries the closures its elements hold — A closure that leaves a handle inside a record, tuple or list is charged like the same closure escaping bare; the enum-payload spelling is still open (debts #997, #1003) (5758f0b)
A written row inside a nominal, an alias or a nested container is compared — A declared slot such as Maybe (Int ->{} Int), a user enum's payload (generic or argument-less), a type alias naming the slot, a row on a non-last arrow of a spine, or a nominal nested in a list, record or tuple was compared against nothing, so a performing function filling it compiled with 0 diagnostics and aborted the VM. The structural descent now reads a nominal's type arguments and its variants' declared payloads (keyed by enum and variant), expands aliases through the one alias owner before comparing, falls back to the value's type when the value's form cannot be taken apart, and walks every arrow of a slot in one pass at all five slot positions: the declared return, the annotated let, the module member, both handler-arm kinds and an effect operation's argument (debts #994, #1048, #1054, #989) (db35575, 483bc8d, 703f29f, 809d7bf, 0727264, 16ceb0d, 392736e, e0b0968, 0424971, 5771fb2, 73d940f, 7d3b648)
An effect operation taking a list or record of callbacks can be performed — An operation's arity counted arrows nested inside brackets and braces, so applyAll : [Int -> Int] -> Int read as arity 2 and could not be performed at all (4d57ee2)
A stdlib native is judged by its own signature — A native has no body to read, so List.length over a list of performing callbacks was rejected inside a pure function. A native's argument now counts as unapplied when no arrow in its signature can receive it and no other argument shares its type variables, so counting, take, drop and reverse are clean while List.map, foldl, Maybe.withDefault and an indexed append still report. A native that hands an argument back is treated as a container of it, so a performing lambda literal passed through List.take and applied later still reports (debts #1073, #1075, #1109) (39fa8ae, 76fd37b, b67fa7f, 578fb8f)
Honest declarations no longer rejected — A built-in constructor at module level (let m = Just noisy), a type alias naming an arrow in a declared return, a composition or a partial application built inside a container, an operation's written slot filled by a lambda literal, and a local lambda that discards its argument are each clean and run, as their named or written-out twins already did (debts #904, #1016, #1089, #1098) (9e1b0a3, b17a552, 90ea3bf, 69c5564, 5f0b814, 8a01e57)
Purity holes through handles, closures and run — Several programs compiled with 0 diagnostics and aborted the VM with UnhandledEffect: a top-level let bound to a performing lambda (while the same lambda inside a container was wrongly rejected), a handler arm returning a declared fn or a container of one, an arrow a call already ran handed to a callee that discards it, an arm silenced by a sibling arm's parameter use, a closure literal handed over inside a container, and a performing fn passed into a run child's callback slot. Each is now charged where it runs (debts #949, #1022, #1095, #1104, #1105, #1106) (463a0fe, 4ec78c2, 03f7446, e766668, efb3ef9, 6a0a9bb, f6e0418)
Performance
No compile regression from the native predicate — The first native-signature check parsed all 672 stdlib signatures per declaration, up to 143× slower at 80 declarations; signatures are now parsed per name on first use, back to the baseline (a6bdb3b)
Diagnostics
One owner for token-span to byte-span conversion — resolve::reservation kept a divergent copy of the conversion that turned a missing token into a byte offset and a synthetic span into 0..0. token_spans::byte_span_in now owns it for both tables and answers None for a miss or a synthetic span (bug report 30) (0a7743c)