{
  "$type": "site.standard.document",
  "bskyPostRef": {
    "cid": "bafyreihegajcjrfbsflxm5c3toz2uplkekcyeuytf57in2q45klcqwpj5u",
    "uri": "at://did:plc:pi6woz4d47bkuws673w2il2r/app.bsky.feed.post/3mirp7aw2jbg2"
  },
  "path": "/t/rfc-mutable-records-as-a-ghc-extension/13886#post_6",
  "publishedAt": "2026-04-05T10:09:57.000Z",
  "site": "https://discourse.haskell.org",
  "textContent": "BurningWitness:\n\n> ADTs cannot be updated in place, they’re constructed anew each time, right? Why do we then use `x { a = b }` and not `C { a = b, .. = x }`?\n\nI agree with your distaste for that syntax. I especially dislike it’s called ‘update’ syntax, because there’s no update going on in the imperative programming sense of overwriting a location. ‘rebuild shorthand’ might be better terminology. I always use the explicit constructor syntax, which works reasonably smoothly with the `..` RecordWildcards.\n\nI agree the `HasField` and friends/‘update’ mechanisms are just too perplexing to be worth using. Indeed auto-naming a function same as a field (as in H98) runs counter to the drive to eliminate punning from other parts of the language.\n\nWhat’s more perspicuous in the earlier proposal’s `data` decl is that a mutable structure can appear only within `IO` (or `ST`).",
  "title": "[RFC] Mutable records as a GHC extension"
}