{
  "$type": "site.standard.document",
  "bskyPostRef": {
    "cid": "bafyreigzbrv4qhb343jlryp7nqzhhky7kehvvvjokmsfky2vllvfmakude",
    "uri": "at://did:plc:pi6woz4d47bkuws673w2il2r/app.bsky.feed.post/3mo7jr4imofo2"
  },
  "path": "/t/haskells-missing-mutable-reference-type/14248?page=3#post_41",
  "publishedAt": "2026-06-13T23:17:12.000Z",
  "site": "https://discourse.haskell.org",
  "textContent": "danidiaz:\n\n> In my personal projects, I prefer to work with bare `IO` instead of usign an app-wide `ReaderT`\n\nYou could still do that! It’s only that when using `libFun`, you would _locally_ instantiate that `m` with `ReaderT Logger IO`, which (modulo newtypes) would give you\n\n\n    libFun ::\n      (String -> Logger -> IO ()) ->\n      (forall r. Int -> (Logger -> IO ()) -> Logger -> IO ()) ->\n      Logger -> IO ()\n\n\nwhich is exactly the type you would want for the non-`IOScopedRef` API\n\ndanidiaz:\n\n> it’s convenient as an alternative to `ReaderT`\n\nThe problem is that it’s _not_ an alternative because you still need to pass the `IOScopedRef` into whatever wants to access it",
  "title": "Haskell's missing mutable reference type"
}