{
  "$type": "site.standard.document",
  "bskyPostRef": {
    "cid": "bafyreidveyk7n6cvckrjs5ayeonchkfdolwmoni7bpd7i7nu7fodosebhi",
    "uri": "at://did:plc:pi6woz4d47bkuws673w2il2r/app.bsky.feed.post/3miti35hpmtx2"
  },
  "path": "/t/rfc-mutable-records-as-a-ghc-extension/13886#post_7",
  "publishedAt": "2026-04-06T07:28:56.000Z",
  "site": "https://discourse.haskell.org",
  "textContent": "AntC2:\n\n> I agree the `HasField` and friends/‘update’ mechanisms are just too perplexing to be worth using.\n\nI guess for record access specifically the coherent approach would be only have access to field labels once a relevant constructor has been scrutinized, but then that creates a non-type that is “the record inside the constructor”, which can’t be passed to functions. This explains why `NamedFieldPuns` and `RecordWildCards` extensions are structured the way they are.\n\n~~Perhaps it would make sense to think of record syntax as a special type, much like`MutableLayout` of this proposal, so that it can be repackaged into a separate type if passed to a function, otherwise the reallocation is somehow elided.~~ _[After thinking about it some more this would introduce way more problems than it would solve]_\n\nRegardless, this proposal isn’t about changing the record syntax for ADTs, we shouldn’t focus this hard on that.",
  "title": "[RFC] Mutable records as a GHC extension"
}