
13 Oct
2005
13 Oct
'05
4:29 p.m.
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. I also don't yet understand how to cast that double array to read ints from it. doubleToInts d = runST ( do arr <- newDoubleArray (1,2) writeDoubleArray arr 1 d i1 <- readIntArray arr 1 i2 <- readIntArray arr 2 return (i1,i2)) Thanks, Joel -- http://wagerlabs.com/ -- http://wagerlabs.com/