> In tracking this down, I did notice that the IOUArray data constructor
> is not exported by MArray (and that is why I produced my own version
> that does export the data constructor). What would be the recommended
> method to convert an STUArray into a IOUArray (without copying)?
> Essentially, I have a function that returns ST s (STUArray s _ _), and
> I want to take the returned value into the IO monad as an IOUArray.
unsafeFreeze followed by unsafeThaw should work.
Cheers,
Simon
- Accessing [Mutable]ByteArray# Martin Pokorny
- RE: Accessing [Mutable]ByteArray# Simon Marlow
- Re: Accessing [Mutable]ByteArray# Martin Pokorny
- Simon Marlow
