suggestion: A common type class for mutable variables
petr.mvd at gmail.com
Thu May 30 20:53:40 CEST 2013
I noticed that there is no common typeclass that would unify STRefs and
IORefs. We already have MArray for ST(U)Arrays and IO(U)Arrays, so why
not for references as well? This would allow writing generic code that
can use both ST- and IO-based variables.
I've found that there is a package that provides such a type class:
I'd suggest to add similar functionality to base, perhaps with some
different wording - I'd rather use Data.MRef (as "mutable reference").
If there is some interest in it, I'd prepare a concrete code for
More information about the Libraries