]> Repositorios git - classgraph.git/commit
Fix equality constraints surfacing every fam-instance main
authorJavier Sagredo <[email protected]>
Fri, 19 Jun 2026 16:21:11 +0000 (18:21 +0200)
committerJavier Sagredo <[email protected]>
Fri, 19 Jun 2026 16:21:11 +0000 (18:21 +0200)
commit3d8fd5b5eb500133d06f2e276484b631551384da
treea70878a0ec552b1f7bfc8d6617412b073487d1df
parent9f81486fb3ce31d5f0b97e1db8b1e7cde96334d5
Fix equality constraints surfacing every fam-instance

The instance-view equality edges (added in 9f81486) call
addFamilyLinksFromArgs with predClassQn = null to surface type families
mentioned inside an equality (e.g. `Norm` in `Norm a ~ Int`). But the
relevance filter that keeps only the fam-instances whose LHS matches the
use site was gated behind `if (predClassQn)`, so the null call skipped it
and pulled in *every* instance of the family.

Concretely: drilling into STS instances and filtering down to ShelleyUTXOW
still showed the `State` of every rule, because ShelleyUTXOW's context has
`State (EraRule "UTXO" era) ~ …` and the unfiltered call dumped all ~21
`State` instances.

Apply the relevance filter (replaceFamilyApp unification) regardless of
predClassQn; only the resolution-chain step stays gated on it. Now the
filtered view shows just `State (ShelleyUTXOW era)` plus a placeholder for
ShelleyUTXOW's own unresolved `State (EraRule "UTXO" era)` reference.

Co-Authored-By: Claude Opus 4.8 (1M context) <[email protected]>
data/viewer.js