On Tue, Jan 25, 2011 at 10:30 PM, Roman Leshchinskiy <[email protected]> 
wrote:
> thawArray# (which creates a mutable copy), update the element, then 
> unsafeFreeze#. I thought that's what you wanted (modulo names). In theory, 
> since both unsafeFreeze# and unsafeThaw# do some work we might want 4 
> different variants of clone:
>
>  Array# -> Array#
>  MutableArray# -> MutableArray#
>  MutableArray# -> Array#
>  Array# -> MutableArray#
>
> I just proposed to call the latter two thaw and freeze to avoid confusing 
> names. I'm not sure if all of them are equally important, even though I would 
> probably use all 4 in vector.

I think I like this. The first version (Array# -> Array#) of close is
only really usable if you want to make sure that an array occupies
less memory than before, but I can see that being useful when slicing.

Johan

_______________________________________________
Cvs-ghc mailing list
[email protected]
http://www.haskell.org/mailman/listinfo/cvs-ghc

Reply via email to