External Publication
Visit Post

Haskell's missing mutable reference type

Haskell Community [Unofficial] June 10, 2026
Source

tomjaguarpaw:

which allows references to be allocated dynamically

And that’s a feature you’ll have to argue for.

Per my earlier example the piece of code we’re looking to allow for is

main = overriding x (+2) foo

such that overriding x modifies the behavior of foo without passing x to foo.

Your implementation uses ReaderT Vault, which, as others have pointed out, is isomorphic to passing Vault to every single function, i.e.

main vault = overriding vault x (+2) $ foo vault

Discussion in the ATmosphere

Loading comments...