<div class="legend-row"><span class="swatch swatch-edge-wrap"><span class="swatch-edge solid amber"></span></span><span>Instance needs a superclass instance (matched locally)</span></div>
<div class="legend-row"><span class="swatch swatch-edge-wrap"><span class="swatch-edge dashed gray"></span></span><span>Needs a superclass instance (no local match)</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 violet"></span></span><span>Instance's associated <code>type instance</code> RHS</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>
<h4>Controls</h4>
if (!matchArgs(fi.fiArgs, inst.iiArgs)) continue;
const famNodeId = ensureFamilyNode(famQn);
const fiNodeId = ensureFamInstanceNode(fi);
- // Family -> fam-instance: this family is defined here.
+ // Family -> fam-instance: this family is defined here. We
+ // *don't* draw an instance → fam-instance edge any more
+ // (the old "= (Rhs)" purple-dotted line) — it was redundant
+ // with the fam-instance node's own label and visually busy.
+ // The fam-instance still surfaces in the graph through this
+ // family link, so the user can see it's relevant.
const linkId = famNodeId + '=>' + fiNodeId;
if (!seenNodes.has(linkId)) {
seenNodes.add(linkId);
id: linkId, source: famNodeId, target: fiNodeId, kind: 'fam-defines',
}});
}
- // Instance -> fam-instance: this instance carries this assoc rhs.
- els.push({ group: 'edges', data: {
- id: instId + '#assoc#' + fi._idx,
- source: instId,
- target: fiNodeId,
- kind: 'assoc-rhs',
- label: '= ' + renderArg(fi.fiRhs, fi.fiTyVars),
- }});
}
});
width: 1.4,
},
},
- // Instance view: assoc-rhs (instance -> fam-instance node)
- {
- selector: 'edge[kind = "assoc-rhs"]',
- style: {
- 'line-color': '#a78bfa',
- 'target-arrow-color': '#a78bfa',
- 'line-style': 'dotted',
- width: 1.4,
- },
- },
// Family/instance view: fam-defines (family -> fam-instance node)
{
selector: 'edge[kind = "fam-defines"]',