Hi Mateusz,
IORef and STRef are boxed references. That is, they are a mutable cell
that contains a pointer to some immutable Haskell value. When you
increment a (STRef Int), you first dereference the pointer, allocate a
new immutable heap object to represent the new integer value, then
mutate the
My mutable-containers package has unboxed and storable references actually.
On Fri, Dec 11, 2015, 12:26 PM Akio Takano wrote:
> Hi Mateusz,
>
> IORef and STRef are boxed references. That is, they are a mutable cell
> that contains a pointer to some immutable Haskell value.