purefunctor / purefunctor/purescript-iris
[checking] elide_missing_patterns does not account for Partial via superclass entailment
@purefunctor is already working on this.
Since May 25, 2026.
- Dominant language
- Rust
- Stars
- 102
- Forks
- 11
- Avg merge
- 3h 30m
- Merged PRs (30d)
- 138
Description
Summary
In compiler-core/checking/src/core/constraint.rs, the elide_missing_patterns check (introduced in #146) uses implication_given.contains(partial) to decide whether to suppress MissingPatterns errors. This only inspects the raw/direct given set and does not account for Partial being made available through superclass entailment.
As a result, if Partial is reachable via a superclass but not listed as a direct given, MissingPatterns errors may still be emitted even though the scope should permit partiality.
Details
- File:
compiler-core/checking/src/core/constraint.rs - Relevant lines: around the
elide_missing_patternscomputation incollect_scoped_constraints
The fix would be to consult the elaborated/entailment-aware given set when computing elide_missing_patterns, so that Partial derived through superclass entailment also suppresses the error.
Context
Raised as a review comment on #146: https://github.com/purefunctor/purescript-alexandrite/pull/146#discussion_r3297875713
Acknowledged as a known limitation by @purefunctor — Partial is typically provided directly in practice, making this a very small class of bug unlikely to appear in real-world codebases. Tracked here for completeness.
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Assessment
This issue has not been assessed yet.