{
  "$type": "site.standard.document",
  "bskyPostRef": {
    "cid": "bafyreievj67iu7ababcqwcbfxcjbdqowcflf53exvpfa6i6zgsbnkviaaa",
    "uri": "at://did:plc:pi6woz4d47bkuws673w2il2r/app.bsky.feed.post/3miknoz7dgdn2"
  },
  "path": "/t/type-equality-in-gadt-typefamily-context/13876#post_6",
  "publishedAt": "2026-04-02T23:03:02.000Z",
  "site": "https://discourse.haskell.org",
  "tags": [
    "apart"
  ],
  "textContent": "Nice.\n\nThe issue with `Just Refl -> STrue` is due to a weird definition of `==` in base (I guess it can’t decide it isn’t in the first case); it will go away if you define `==` the obvious way.\n\nYou can also replace `eqSymbol` with a smaller, more general apart primitive, allowing you to write the second `pop` case like so.\n\n\n    pop l@(ConsN x n) c = case decideSymbol x c of\n      Left  (apart -> Refl) -> l\n      Right           Refl  -> n\n",
  "title": "Type equality in GADT/TypeFamily context"
}