purefunctor / purefunctor/purescript-iris

[checking] elide_missing_patterns does not account for Partial via superclass entailment

Open
#147 0 comments 0 reactions 1 assignee View on GitHub

@purefunctor is already working on this.

Since May 25, 2026.

checking semantics
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_patterns computation in collect_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

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.