freezeArray :: Ix ix => MutableArray s ix elt -> ST s (Array ix elt)
thawArray :: Ix ix => Array ix elt -> ST s (MutableArray s ix elt)
-unsafeFreezeArray :: Ix ix => MutableArray s ix elt -> ST s (Array ix elt)
+unsafeFreezeArray :: Ix ix => MutableArray s ix elt -> ST s (Array ix elt)
+unsafeThawArray :: Ix ix => Array ix elt -> ST s (MutableArray s ix elt)
</code></tscreen>
<nidx>newArray</nidx>
<nidx>boundsOfArray</nidx>
<nidx>freezeArray</nidx>
<nidx>thawArray</nidx>
<nidx>unsafeFreezeArray</nidx>
+<nidx>unsafeThawArray</nidx>
<bf/Remarks:/
<item>
The operation <tt/thawArray/ goes the other way, converting
an immutable <tt/Array/ into a mutable one. This is done by
-copying. The operation <tt/unsafeThawArray/ is not provided
-(allthough it conceivably could be.)
+copying. The operation <tt/unsafeThawArray/ is also provided,
+which places the same kind of proof obligation on the programmer
+as <tt/unsafeFreezeArray/ does.
</itemize>
<sect3> <idx/Mutable byte arrays/
readFloatArray :: Ix ix => MutableByteArray s ix -> ix -> ST s Float
readDoubleArray :: Ix ix => MutableByteArray s ix -> ix -> ST s Double
readStablePtrArray :: Ix ix => MutableByteArray s ix -> ix -> ST s (StablePtr a)
-readWord8Array :: Ix ix => MutableByteArray s ix -> Int -> ST s Word8
-readWord16Array :: Ix ix => MutableByteArray s ix -> Int -> ST s Word16
-readWord32Array :: Ix ix => MutableByteArray s ix -> Int -> ST s Word32
-readWord64Array :: Ix ix => MutableByteArray s ix -> Int -> ST s Word64
-readInt8Array :: Ix ix => MutableByteArray s ix -> Int -> ST s Int8
-readInt16Array :: Ix ix => MutableByteArray s ix -> Int -> ST s Int16
-readInt32Array :: Ix ix => MutableByteArray s ix -> Int -> ST s Int32
-readInt64Array :: Ix ix => MutableByteArray s ix -> Int -> ST s Int64
+readWord8Array :: Ix ix => MutableByteArray s ix -> ix -> ST s Word8
+readWord16Array :: Ix ix => MutableByteArray s ix -> ix -> ST s Word16
+readWord32Array :: Ix ix => MutableByteArray s ix -> ix -> ST s Word32
+readWord64Array :: Ix ix => MutableByteArray s ix -> ix -> ST s Word64
+readInt8Array :: Ix ix => MutableByteArray s ix -> ix -> ST s Int8
+readInt16Array :: Ix ix => MutableByteArray s ix -> ix -> ST s Int16
+readInt32Array :: Ix ix => MutableByteArray s ix -> ix -> ST s Int32
+readInt64Array :: Ix ix => MutableByteArray s ix -> ix -> ST s Int64
writeCharArray :: Ix ix => MutableByteArray s ix -> ix -> Char -> ST s ()
writeIntArray :: Ix ix => MutableByteArray s ix -> ix -> Int -> ST s ()
writeFloatArray :: Ix ix => MutableByteArray s ix -> ix -> Float -> ST s ()
writeDoubleArray :: Ix ix => MutableByteArray s ix -> ix -> Double -> ST s ()
writeStablePtrArray :: Ix ix => MutableByteArray s ix -> ix -> StablePtr a -> ST s ()
-writeWord8Array :: Ix ix => MutableByteArray s ix -> Int -> Word8 -> ST s ()
-writeWord16Array :: Ix ix => MutableByteArray s ix -> Int -> Word16 -> ST s ()
-writeWord32Array :: Ix ix => MutableByteArray s ix -> Int -> Word32 -> ST s ()
-writeWord64Array :: Ix ix => MutableByteArray s ix -> Int -> Word64 -> ST s ()
-writeInt8Array :: Ix ix => MutableByteArray s ix -> Int -> Int8 -> ST s ()
-writeInt16Array :: Ix ix => MutableByteArray s ix -> Int -> Int16 -> ST s ()
-writeInt32Array :: Ix ix => MutableByteArray s ix -> Int -> Int32 -> ST s ()
-writeInt64Array :: Ix ix => MutableByteArray s ix -> Int -> Int64 -> ST s ()
+writeWord8Array :: Ix ix => MutableByteArray s ix -> ix -> Word8 -> ST s ()
+writeWord16Array :: Ix ix => MutableByteArray s ix -> ix -> Word16 -> ST s ()
+writeWord32Array :: Ix ix => MutableByteArray s ix -> ix -> Word32 -> ST s ()
+writeWord64Array :: Ix ix => MutableByteArray s ix -> ix -> Word64 -> ST s ()
+writeInt8Array :: Ix ix => MutableByteArray s ix -> ix -> Int8 -> ST s ()
+writeInt16Array :: Ix ix => MutableByteArray s ix -> ix -> Int16 -> ST s ()
+writeInt32Array :: Ix ix => MutableByteArray s ix -> ix -> Int32 -> ST s ()
+writeInt64Array :: Ix ix => MutableByteArray s ix -> ix -> Int64 -> ST s ()
freezeCharArray :: Ix ix => MutableByteArray s ix -> ST s (ByteArray ix)
freezeIntArray :: Ix ix => MutableByteArray s ix -> ST s (ByteArray ix)
sizeofMutableByteArray :: Ix ix => MutableByteArray s ix -> Int
+thawByteArray :: Ix ix => ByteArray ixt -> ST s (MutableByteArray s ix)
+unsafeThawByteArray :: Ix ix => ByteArray ixt -> ST s (MutableByteArray s ix)
+
</code></tscreen>
<nidx>newCharArray</nidx>
<nidx>newAddrArray</nidx>
<nidx>freezeFloatArray</nidx>
<nidx>freezeDoubleArray</nidx>
<nidx>unsafeFreezeByteArray</nidx>
+<nidx>unsafeThawByteArray</nidx>
+<nidx>thawByteArray</nidx>
<bf/Remarks:/
<itemize>
class of actions. There's also the non-copying
<tt/unsafeFreezeByteArray/.
<p>
-Thawing of byte arrays is currently not supported.
+<item>
+Operations for going the other way, where an immutable byte
+array is 'thawed' are also provided. <tt/thawByteArray/ does
+this by copying, whereas <tt/unsafeThawByteArray/ does not
<item>
The operation <tt/sizeofMutableByteArray/ returns the size of