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
typing: full Maranget usefulness check for ExprKind::Match exhaustiveness #66
PR #65 lands core ExprKind::Match end-to-end across typing, interp, linear/affine, and wasm. ephapax-typing::check_exhaustiveness ships a simplified algorithm that catches the common errors:
catch-all (wildcard / bare Var) detected
constructor coverage over the parent data type
literal-without-wildcard rejected as non-exhaustive
It does not implement full Maranget-style usefulness over nested matrices.
Gaps
Nested constructor patterns.match xs with | Cons(_, Nil) -> ... | Cons(_, Cons(_, _)) -> ... | Nil -> ... — typechecker accepts each pattern individually but does not prove the set is exhaustive over the inner column.
Literal coverage over infinite domains. For Int / String scrutinees the only way to be exhaustive is a wildcard. We already require this, but we do not yet handle Bool where true + false should be exhaustive without a wildcard.
Mixed literal + constructor columns (e.g. matching on a tuple where one slot is a constructor and another is a literal).
Proposal
Port a Maranget specialization-and-default matrix decomposition into ephapax-typing:
Pattern row → typed column matrix; recurse with specialize(ctor) and default reductions
usefulness check on the synthetic row of wildcards
reuse existing DataCtorRegistry for constructor enumeration
emit NonExhaustiveMatch { missing: pretty(witness) } from the recovered witness pattern
Acceptance
cargo test -p ephapax-typing --lib covers: bool full coverage without wildcard, nested option-of-option exhaustive, nested option-of-option non-exhaustive (witness reports Some(Some(_)) or similar), tuple of (Option<T>, Bool) exhaustive.
Activity
feat(wasm): nested constructor patterns in match arm args (#68)
typing: full Maranget usefulness for match exhaustiveness (#66) (#69)
wasm: nested constructor patterns in match arm args (#68) (#71)
lsp: extern + data symbols; clear stale TODOs (#75) (#76)
fix(security): resolve code-scanning alerts #20, #66, #67, SAST #25 (#…