
13 Oct
2005
13 Oct
'05
6:09 p.m.
On 10/13/05, joel reymont
Folks,
Are there any examples on using STUArray and friends? I'm trying to convert the following bit of code which uses deprecated features.
I don't understand the syntax needed to create a new double or float array with newArray from Data.Array.MArray.
do arr <- newArray_ (1,2) :: ST s (STUArray s Int Double) writeArray arr 1 d ... The type signature is to remove the ambiguity in type-class constraints.
I also don't yet understand how to cast that double array to read ints from it.
Don't. Best regards Tomasz