From 4c9c19468588ade1cb323b2d951a4d452257943b Mon Sep 17 00:00:00 2001 From: Javier Sagredo Date: Thu, 7 May 2026 02:24:36 +0200 Subject: [PATCH] Drop the data-fam-instance "Kind" panel entry entirely MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit The previous text was wrong on two counts: it labelled the row "Kind" even though it wasn't showing any kind, and it called the rhs a "synthetic GHC-internal data constructor" — but the user *did* write the data constructor (`CrateInt Int`, etc.); the only synthetic part is the R: TyCon GHC uses internally to represent the instance. We don't extract data constructors into the schema, so we have nothing useful to show on the rhs side for data fam-instances. Just omit the row. Co-Authored-By: Claude Opus 4.7 (1M context) --- data/viewer.js | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/data/viewer.js b/data/viewer.js index efbe951..c58b110 100644 --- a/data/viewer.js +++ b/data/viewer.js @@ -1934,14 +1934,14 @@ `
    ${fi.fiTyVars.map(v => `
  • ${escape(v.tvName)} :: ${escape(v.tvKind)}
  • `).join('')}
`; const src = renderDefinedAt(fi.fiSrc, fi.fiDefinedIn || fi.fiFamily.qnPackage); - // For data fam-instances we *don't* show a "Right-hand side" row. - // GHC's representation is the synthetic R: TyCon (`R:CrateInt`), - // and after our R: rewrite it's the abstract @FamilyApp Family - // [args]@ form — structurally equal to the LHS, so labelling it - // "Right-hand side" was actively misleading. Show a brief - // explanatory note instead. + // Data fam-instances: omit the "Right-hand side" row entirely. + // What GHC stores as the rhs is the synthetic R: TyCon, and our + // R: rewrite turns it into a copy of the LHS — neither is the + // user's actual data-constructor declaration. We don't extract + // the data constructors themselves into the schema, so we have + // nothing useful to show. const rhsEntry = fi.fiIsData - ? `
Kind
Data instance — the right-hand side is a synthetic GHC-internal data constructor and isn't shown.
` + ? '' : `
Right-hand side
${escape(renderArg(fi.fiRhs, fi.fiTyVars))}
`; return `

${head}

-- 2.54.0