{
  "$type": "site.standard.document",
  "bskyPostRef": {
    "cid": "bafyreia7mzna3c2zd5xdbfd2su4pcfjilp3qvnbwagnt6uxz32mqvd5gf4",
    "uri": "at://did:plc:pi6woz4d47bkuws673w2il2r/app.bsky.feed.post/3mnw6jpioy262"
  },
  "path": "/t/haskells-missing-mutable-reference-type/14248#post_15",
  "publishedAt": "2026-06-10T07:00:46.000Z",
  "site": "https://discourse.haskell.org",
  "tags": [
    "A reference implementation of IOScopedRef"
  ],
  "textContent": "I’m still not quite sure what you mean. Yes, `withIOScopedRef` in particular, and `IOScopedRef` in general, is a feature I am arguing for! Part of its essential behaviour is to allow references to be allocated dynamically, just like an essential feature of `IORef` is that they can be allocated dynamically.\n\nBut suppose I had your `contextual`. I could define\n\n\n    contextual vault :: Contextual Vault\n    contextual vault = Vault.empty\n\n\nto reconcile my interface with your implementation, couldn’t I?\n\n(This is essentially what A reference implementation of IOScopedRef suggests: _one_ global contextual variable, which is a vault.)",
  "title": "Haskell's missing mutable reference type"
}