From a8628798a255bcf32d891ab012fb40437c2ae962 Mon Sep 17 00:00:00 2001 From: Javier Sagredo Date: Thu, 7 May 2026 00:12:43 +0200 Subject: [PATCH] =?utf8?q?Remove=20the=20"via=20Bar"=20instance=20?= =?utf8?q?=E2=86=92=20family=20edge?= MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit The dashed light-purple arrow connecting an instance to a referenced type family was visually opaque — readers couldn't tell what relationship it depicted. Drop it from addFamilyLinksFromArgs along with its cytoscape style rule and the help-legend row. The fam-instance nodes the function surfaces and the fam-resolves chain edges remain — those are the meaningful continuations from the matched-superclass-instance node. Co-Authored-By: Claude Opus 4.7 (1M context) --- data/viewer.html | 1 - data/viewer.js | 30 +++++------------------------- 2 files changed, 5 insertions(+), 26 deletions(-) diff --git a/data/viewer.html b/data/viewer.html index e83979d..423e001 100644 --- a/data/viewer.html +++ b/data/viewer.html @@ -51,7 +51,6 @@
Context constraint required by this instance
Instance needs a superclass instance (matched locally)
Needs a superclass instance (no local match)
-
Instance references this type family
Family → one of its type family instances
Instance's associated type instance RHS
Type family instance resolves to a class instance (chain)
diff --git a/data/viewer.js b/data/viewer.js index 2ea384e..fceca61 100644 --- a/data/viewer.js +++ b/data/viewer.js @@ -621,24 +621,16 @@ // focused-instance → family → concrete fam-instance → Eq instance // visible as one path instead of two unrelated arrows. function addFamilyLinksFromArgs(args, originId, edgeTag, predClassQn) { + // The "via Bar" arrow that used to connect @originId@ → family + // was removed (its meaning wasn't obvious). The function's + // remaining job is to surface fam-instance nodes plus the + // resolution chain that ends at a matching class instance. const fams = collectFamilyRefs(args); for (const fa of fams) { const famNodeId = ensureFamilyNode(fa); - const linkId = originId + '#viafam#' + edgeTag + '#' + famNodeId; - if (!seenNodes.has(linkId)) { - seenNodes.add(linkId); - els.push({ group: 'edges', data: { - id: linkId, - source: originId, - target: famNodeId, - kind: 'via-family', - label: 'via ' + fa.qnName, - }}); - } // Surface only the type family instances whose LHS *can* describe // the focused instance's family-app — anything else is unrelated - // noise (e.g. `TxIn ByronBlock` while looking at a Shelley - // instance). Run the relevance check *before* creating the + // noise. Run the relevance check *before* creating the // fam-instance node so irrelevant rows are skipped entirely. for (const fi of (famInstsByFamily.get(famNodeId) || [])) { let resolvedArgs = null; @@ -1804,18 +1796,6 @@ width: 1.4, }, }, - // Instance view: via-family (instance -> family node, indicating the - // constraint mentions a type family that must be defined elsewhere). - { - selector: 'edge[kind = "via-family"]', - style: { - 'line-color': '#c084fc', - 'target-arrow-color': '#c084fc', - 'line-style': 'dashed', - width: 1.2, - 'font-size': 9, - }, - }, // Family/instance view: fam-defines (family -> fam-instance node) { selector: 'edge[kind = "fam-defines"]', -- 2.54.0