{
  "$type": "site.standard.document",
  "bskyPostRef": {
    "cid": "bafyreibqqtsntu5ktl6mpivqkzg5bwooxn5ka2l4hs74m622r3ahqqdnwe",
    "uri": "at://did:plc:pi6woz4d47bkuws673w2il2r/app.bsky.feed.post/3mokwih7dpud2"
  },
  "path": "/t/haskells-missing-mutable-reference-type/14248?page=4#post_63",
  "publishedAt": "2026-06-18T08:31:03.000Z",
  "site": "https://discourse.haskell.org",
  "tags": [
    "@prophet",
    "@BurningWitness",
    "Haskell's missing mutable reference type - #7 by tomjaguarpaw",
    "writeUserDataConcurrently"
  ],
  "textContent": "tobz619:\n\n> I’m not quite reading why you want to do this over reading the value from the `IORef` just before passing that value as a parameter to your local thread?\n\nThat’s a similar transformation to the one proposed by @prophet and @BurningWitness in this thread. My response is this: Haskell's missing mutable reference type - #7 by tomjaguarpaw.\n\nBasically, your transformation works when you can see the refs that you need to clone. If you can’t, you don’t know that you need to clone them!\n\nI changed the concurrency example to try to make this a bit clearer. Have a look at writeUserDataConcurrently. How would you write it using your proposed transformation? I bet you can’t!\n\nSince the same idea has come up three times now in slightly different forms it’s clearly an important one to address. Can you think of a way I can make it more obvious, or do you have any further questions about it I can help resolve?",
  "title": "Haskell's missing mutable reference type"
}