Hacktoberfest 2026: le issue che i maintainer hanno segnato per ottobre, aperte e adatte ai principianti. Sfoglia le issue Hacktoberfest

Better error messages for failed subeffect constraints

Aperta
#13,587 0 commenti 0 reazioni 0 assegnatari Vedi su GitHub

I maintainer di solito rispondono entro 1 giorno

Nessuno ha ancora preso questa issue.

Valutazione

Difficoltà
5/5
Tempo stimato
Più di una settimana
Idoneità per principianti
35/100
Tipo di issue
Funzionalità
Chiarezza
Abbastanza chiara
Stato di attività
Attiva
Ambito
compilers

Direzione di ricerca

Start by reading the effect constraint generation, effect-provenance graph, and lax-equation unification paths described in the issue; the payload does not name specific files or tests. Trace how subeffect constraints from lambdas, local definitions, casts, and holes are represented, then check how a failed constraint reaches the diagnostic. Done means the error identifies the actual and expected effects and traces failed lax equations back to their originating subeffect constraint.

Scritto dal modello di indicizzazione a partire dal testo della issue.

Descrizione

A subeffect constraint s ⊑ t (the body's effect is a subset of the lambda's effect) has no provenance of its own. When it cannot be solved, it is reported as if it were the equality t ~ s, using the provenance and the MismatchedEffects error of an equality. When the effect-provenance graph finds no path, the leftover lax equation s ∩ ¬t ~ ∅ names neither side, so the message gets worse still.

With subeffecting on by default (#13579), every lambda and local def, checked effect cast and hole produces such a constraint, so these messages will become common.

Proposal:

  • Give subeffect constraints a provenance of their own, e.g. ExpectSubEff(expected, actual, loc), and have the effect-provenance graph treat it as a flow edge through the lambda's effect variable.
  • Report a failed subeffect constraint with a dedicated error that names the effects of the actual effect that the expected effect does not allow.
  • When effect unification fails on the lax equation, trace it back to the subeffect constraint it came from instead of reporting the raw set equation.

#13566 is a first attempt; it is closed in favour of this issue.

🤖 Generated with Claude Code

Lingua principale
Flix
Stelle
2.7k
Fork
194
Merge medio
7h
PR unite (30g)
137

Preparare l'ambiente

Come iniziare

  1. Leggi tutta la issue e poi la guida ai contributi del progetto.
  2. Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
  3. Fai un fork del repository e lavora su un branch.
  4. Apri una pull request che faccia riferimento al numero della issue.

Altre issue di flix/flix

Tutte le issue di flix/flix

Issue simili

Altre issue su Compilers

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.