suggestion: A common type class for mutable variables

Petr Pudlák petr.mvd at
Thu May 30 20:53:40 CEST 2013

Dear Haskellers,

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 

   Best regards,
   Petr Pudlak

More information about the Libraries mailing list