
30 May
2013
30 May
'13
2:53 p.m.
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: http://hackage.haskell.org/package/reference 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 consideration. Best regards, Petr Pudlak