Haskell's missing mutable reference type

BurningWitness:

tomjaguarpaw:

if IOScopedRef existed then I could instantiate the Logger argument to writeUserData to get the behaviour I desire

Yes, though I would object to this feature being implemented like that.

Sorry, what feature? Do you mean I shouldn’t use IOScopedRef (if it existed) to get the behaviour I desire, or IOScopedRef shouldn’t be implemented? In either case, what do you object to?

BurningWitness:

tomjaguarpaw:

I don’t know what “with references” means.

As in with either contextual values I outlined above or IOScopedRef.

With “references”, the libraries providing Logger and writeUserData need not know anything about the existence of “references”. Only the caller need use them.