You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Add the missing class and instance checks (M5 codes without a checker kind) #97
Part of #77 (Phase 4). The M5 codes that have no corresponding checker kind at all — new checks, not new mappings. 30 corpus cases.
Code
Cases
Needs
InvalidInstanceHead
7
Validate the instance head against the class: constructor head vs. type variable head, the newtype-constructor special case.
OrphanInstance
7
Reject an instance whose class is not in scope, or whose type is defined elsewhere. Needs a rule that composes with OrphanTypeDeclaration, which is already reported.
InvalidNewtypeInstance
6
Coercible/Coerce instance validity — adjacent to FE-16's role checking, which is already in place.
ClassInstanceArityMismatch
4
Compare the instance head's argument count against the class's.
CycleInTypeClassDeclaration
2
Class-member and superclass cycles.
MissingClassMember
2
Maps from the existing MissingInstanceMethod kind.
PossiblyInfiniteInstance
1
Head-recursive use of the instance being solved.
DuplicateTypeClass
1
Two classes with one name.
DuplicateInstance
1
Two instances for the same head.
Prerequisites
DuplicateInstance and DuplicateTypeClass are resolver work, not typechecker work — they belong with #90, which takes instances into the resolver. Do them there or coordinate explicitly, or they will be solved twice.
The 2026-10-17 L5 board is 77/97. Of the codes this issue lists, these now agree: InvalidNewtypeInstance 6/6, ClassInstanceArityMismatch 4/4, DuplicateInstance 1/1, MissingClassMember 2/2.
Still open: InvalidInstanceHead 6 (1/7), OrphanInstance 7 (0/7), PossiblyInfiniteInstance 1 (0/1), DuplicateTypeClass 1 (0/1). Corpus cases moves from 30 to 15. CycleInTypeClassDeclaration is not in the current L5 per-code table, so it is not part of the 15.
Evidence: the L5 row in docs/design/D-04-suite-roadmap.md (2026-10-17, 886cd82c, annotations oracle).
All codes this issue owns agree on the L5 board, remeasured 2026-10-18 on master (annotations oracle, vendored corpus, package e556bf2f): 98/99, denominator 97 → 99 after the two superclass-cycle cases left the blocked rows.
InvalidInstanceHead 7/7 — the determined-head rule at the common instance recorder (4a078b95), one rule covering the wildcard, free-variable-through-synonym (TypeSynonyms7), derived-head (3510, InvalidDerivedInstance2), and fundep-undetermined (RowInInstanceNotDetermined0/1/2) triggers; official covering-set minimalization (9a4c2e04).
OrphanInstance 7/7 — the official orphan rule (298cc585); 3405.purs's produced set is exactly [OrphanInstance].
The only remaining L5 mismatch is ClassHeadNoVTA3.purs, which is #123's visible-type-application limit, not a code this issue owns. Boards: L2 72/72 + 403/413 passing, L3 44/48, L4 41/50, L6/M7 287/340 (serial rerun, same failure set; recorded in D-04 and the runtime-program scoreboard). The Project board field updates for this item still need the project scope on the gh token.
Activity
Record the Prim.Row owner and what the kind work still needs
Record the Prim.Row owner and what the kind work still needs
biuld commentedon Oct 16, 2026
The 2026-10-17 L5 board is 77/97. Of the codes this issue lists, these now agree:
InvalidNewtypeInstance6/6,ClassInstanceArityMismatch4/4,DuplicateInstance1/1,MissingClassMember2/2.Still open:
InvalidInstanceHead6 (1/7),OrphanInstance7 (0/7),PossiblyInfiniteInstance1 (0/1),DuplicateTypeClass1 (0/1).Corpus casesmoves from 30 to 15.CycleInTypeClassDeclarationis not in the current L5 per-code table, so it is not part of the 15.Evidence: the L5 row in
docs/design/D-04-suite-roadmap.md(2026-10-17,886cd82c, annotations oracle).biuld commentedon Oct 18, 2026
All codes this issue owns agree on the L5 board, remeasured 2026-10-18 on master (annotations oracle, vendored corpus, package
e556bf2f): 98/99, denominator 97 → 99 after the two superclass-cycle cases left the blocked rows.InvalidInstanceHead7/7 — the determined-head rule at the common instance recorder (4a078b95), one rule covering the wildcard, free-variable-through-synonym (TypeSynonyms7), derived-head (3510,InvalidDerivedInstance2), and fundep-undetermined (RowInInstanceNotDetermined0/1/2) triggers; official covering-set minimalization (9a4c2e04).OrphanInstance7/7 — the official orphan rule (298cc585);3405.purs's produced set is exactly[OrphanInstance].PossiblyInfiniteInstance1/1 (438.purs),CycleInTypeClassDeclaration2/2 (Superclasses2,SelfCycleInTypeClassDeclaration) —4a078b95.DuplicateTypeClass1/1 — resolver-side distinction fromDeclConflict(fd7bf88a), withDeclConflictstaying 11/11 andDuplicateInstance1/1.InvalidNewtypeInstance6/6,ClassInstanceArityMismatch4/4,MissingClassMember2/2,DuplicateInstance1/1,CannotDeriveInvalidConstructorArg7/7 unchanged.The only remaining L5 mismatch is
ClassHeadNoVTA3.purs, which is #123's visible-type-application limit, not a code this issue owns. Boards: L2 72/72 + 403/413 passing, L3 44/48, L4 41/50, L6/M7 287/340 (serial rerun, same failure set; recorded in D-04 and the runtime-program scoreboard). TheProjectboard field updates for this item still need theprojectscope on theghtoken.