{
  "$type": "site.standard.document",
  "bskyPostRef": {
    "cid": "bafyreiclirbqltu73uwz5zq33uytwulvqgd2hrtkf4w4zelrjoud3ea2w4",
    "uri": "at://did:plc:pi6woz4d47bkuws673w2il2r/app.bsky.feed.post/3moaem6b34p52"
  },
  "path": "/t/haskells-missing-mutable-reference-type/14248?page=3#post_42",
  "publishedAt": "2026-06-14T07:16:11.000Z",
  "site": "https://discourse.haskell.org",
  "tags": [
    "ref",
    "Repository",
    "this component"
  ],
  "textContent": "prophet:\n\n> You could still do that! It’s only that when using `libFun`, you would _locally_ instantiate that `m` with `ReaderT Logger IO`\n\nIIUC, wouldn’t that force you to make `libFun` polymorphic over the monad?\n\nprophet:\n\n> The problem is that it’s _not_ an alternative because you still need to pass the `IOScopedRef` into whatever wants to access it\n\nWhen I build the graph of components for my application during initialization, I’m ok with passing the ref to any component that uses it directly, like the Repository in my example. What I don’t want is having to pass it to the components that depend on `Repository`. Like this component which uses the repository but doesn’t need to know about the connection or how it’s obtained.",
  "title": "Haskell's missing mutable reference type"
}