The user observed cases where a more general fam-instance LHS
(e.g. `data instance LedgerState (ShelleyBlock proto era) mk`)
should cover a more concrete use site (`… EmptyMK`) but the chain
doesn't draw — biUnify's wildcard rule on TyVarRef should handle
this in principle, but kind-arg interactions in the rep TyCon
can leave the unifier looking at structure that doesn't quite
line up. List this as a third reason so the side panel stops
implying the only failures are external-family / nested-args.
Co-Authored-By: Claude Opus 4.7 (1M context) <[email protected]>
<div class="legend-row"><span class="swatch swatch-edge-wrap"><span class="swatch-edge solid amber"></span></span><span>Superclass constraint, satisfied by an instance in this project</span></div>
<div class="legend-row"><span class="swatch swatch-edge-wrap"><span class="swatch-edge dashed gray"></span></span><span>Superclass constraint, points at a predicate node (external or context)</span></div>
<div class="legend-row"><span class="swatch swatch-edge-wrap"><span class="swatch-edge solid violet"></span></span><span>Family → one of its type family instances</span></div>
- <div class="legend-row"><span class="swatch swatch-edge-wrap"><span class="swatch-edge dotted teal"></span></span><span>Type family instance resolves to a class instance (chain)</span></div>
+ <div class="legend-row"><span class="swatch swatch-edge-wrap"><span class="swatch-edge dotted teal"></span></span><span>Type family instance is an instance of class</span></div>
<h4>Controls</h4>
<div class="help-tip">Click → highlight + side panel</div>
<ol class="placeholder-reasons">
<li><strong>External family</strong> — the family's equations live in a package you haven't extracted. Re-run the plugin against the defining package to surface them here.</li>
<li><strong>Nested or abstract args</strong> — classgraph doesn't fully simulate GHC's type-family rewrite chain. For example, <code>F (G a)</code> won't match a concrete instance like <code>F (Bar c)</code> unless we can first reduce <code>G a</code> to a <code>Bar _</code> shape; if <code>a</code> stays abstract or the inner reduction fails, the outer family looks unresolvable even though the equations are in your dumps.</li>
+ <li><strong>More general instance available</strong> — a fam-instance whose LHS is strictly more general than your use site (e.g. you have <code>data instance LedgerState (ShelleyBlock proto era) mk</code> but the use site is <code>LedgerState (ShelleyBlock proto era) EmptyMK</code>) may not be picked up by our unifier when the abstract slot's kind interacts with how GHC stores the rep. The general instance is the right one to read here even though it isn't drawn as a chain edge.</li>
</ol>
<p class="placeholder-hint">Open the family node (the diamond above this row) to see all the fam-instances we <em>do</em> have for it — one of them may be the satisfier in the actual program.</p>
</dd>