From: Javier Sagredo Date: Wed, 6 May 2026 22:14:26 +0000 (+0200) Subject: Drop the instance → fam-instance "= (Rhs)" edge X-Git-Url: https://git.sagredo.dev/?a=commitdiff_plain;h=a9423861e888864ecec60d49ccca36634fd91f8f;p=classgraph.git Drop the instance → fam-instance "= (Rhs)" edge The dotted-purple edge from a focused instance to its associated fam-instance carried only the RHS label, which the fam-instance node's own label already shows in full. Removing it cleans up the instance view; the fam-instance still surfaces because the family node points at it via fam-defines, which is enough to indicate the context relevance. Also drop the now-dead cytoscape style rule and the legend row. Co-Authored-By: Claude Opus 4.7 (1M context) --- diff --git a/data/viewer.html b/data/viewer.html index 423e001..e782589 100644 --- a/data/viewer.html +++ b/data/viewer.html @@ -52,7 +52,6 @@
Instance needs a superclass instance (matched locally)
Needs a superclass instance (no local match)
Family → one of its type family instances
-
Instance's associated type instance RHS
Type family instance resolves to a class instance (chain)

Controls

diff --git a/data/viewer.js b/data/viewer.js index 45d1fd3..d35899c 100644 --- a/data/viewer.js +++ b/data/viewer.js @@ -737,7 +737,12 @@ 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); @@ -745,14 +750,6 @@ 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), - }}); } }); @@ -1785,16 +1782,6 @@ 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"]',