External Publication
Visit Post

Haskell's missing mutable reference type

Haskell Community [Unofficial] June 14, 2026
Source

tomjaguarpaw:

For example, when the Severity reaches a certain elevated level the caller may want modifySeverity to obtain a connection to a different logging channel (maybe it starts writing to a file rather than stdout) for the duration of elevated execution (but no longer than that). I want to support that use case.

This assumes that the logger is its own separate actor and that’s way too complex for my tastes. I’d go with a static approach where some flows are known upfront to log to file when certain conditions are met. All you’d then need is to open a file and pass a different logger down.

Discussion in the ATmosphere

Loading comments...