{
  "$type": "site.standard.document",
  "bskyPostRef": {
    "cid": "bafyreib5sysoopqxulrfowu26pwcczqqk6wd4ryjr3m3tfi7mxmlcclqgm",
    "uri": "at://did:plc:pi6woz4d47bkuws673w2il2r/app.bsky.feed.post/3mimdg4xvmzu2"
  },
  "path": "/t/type-equality-in-gadt-typefamily-context/13876#post_7",
  "publishedAt": "2026-04-03T07:02:10.000Z",
  "site": "https://discourse.haskell.org",
  "tags": [
    "@Lysxia",
    "@Leary"
  ],
  "textContent": "I tried solutions from @Lysxia and @Leary.\nThanks a lot, I totally missed the coerce hammer option!\nThe original attempt checks if I just put unsafeCoerce in the last branch. Without `If` typefamily UndecidableInstances can be turned off.\n\n\n    type family Pop n c where\n      Pop '[]       _  = '[]\n      Pop (c ': n)  c  = n\n      Pop m         c  = m\n\n    pop :: forall c n. KnownSymbol c => N n -> Proxy c -> N (Pop n c)\n    pop (NilN ()) _  = NilN ()\n    pop l@(ConsN x n) c =\n     case sameSymbol x c of\n       Just Refl -> n\n       Nothing   -> unsafeCoerce l\n",
  "title": "Type equality in GADT/TypeFamily context"
}