Skip to content

M4 type-checking rules: hole inference and the missing diagnostics #99

Closed

Description

@biuld

Part of #77 (Phase 4). The M4 cases that need rules, not codes. 61 M4 cases total; 44 of them become measurable the moment #81 lands, leaving these.

Code Cases Status
TypesDoNotUnify 41 Needs the mapping only — this is the bulk of L4
HoleInferredType 10 No rule exists; needs hole tracking through inference
CannotApplyExpressionOfTypeOnType 2 No rule exists
ExpectedType 2 No rule exists; needs the purs semantics decision (#81)
AmbiguousTypeVariables 1 AmbiguousConstraint exists; needs the counterpart chosen
InfiniteType 2 OccursCheck exists; mapping only
IntOutOfRange 1 IntegerOutOfRange exists; mapping only
EscapedSkolem 2 Already mapped; verify the two cases agree

Hole tracking

HoleInferredType is 10 cases and is the one genuine feature here. A hole must survive unification as a named constraint on an inference variable, so the reported type is the type the hole was solved to, not a fresh variable. That is a real change to the inference core, and it is FE-17's "holes" item.

Acceptance

All 61 M4 cases agree on the L4 scoreboard, and FE-08/FE-09/FE-10/FE-12 each state a concrete remaining gap rather than "reach the complete L4/L6 gate".

Activity

  1. added
    gate:L4Blocks core type checking (D-04 L4)
    gate:L5Blocks type classes and instances (D-04 L5)
    area:frontendFrontend: syntax, resolution, kinds, types, classes
    on Oct 1, 2026
  2. biuld commented on Oct 22, 2026

    @biuld
    OwnerAuthor

    L4 is 65/65, including HoleInferredType 10/10 and all original mapped type codes. The relevant feature rows now name concrete remaining passing-program gaps.

    Verified by PR #164 (41a16e2): formatting, default Clippy, full workspace (2331 passed, zero failed), five separately executed frontend boards, all 22 official purs differential tests, and the complete serial runtime board (297/340; 25 FFI exclusions; every agreeing exit zero). Required Wasmtime CI execution check 119961920075 completed successfully. The three losses versus the older board reproduce on the unmodified starting HEAD; BigFunction remains an explicit incomplete compiler verdict.

    Evidence: Phase 4 acceptance review.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    area:frontendFrontend: syntax, resolution, kinds, types, classesenhancementNew feature or requestgate:L4Blocks core type checking (D-04 L4)gate:L5Blocks type classes and instances (D-04 L5)

    Projects

    No projects

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions