[Haskell-cafe] How can I pass IOUArrays to FFI functions?

Bulat Ziganshin bulat.ziganshin at gmail.com
Tue Aug 21 04:57:28 EDT 2007


Hello Ryan,

Tuesday, August 21, 2007, 10:47:06 AM, you wrote:

>> Your code is broken in a most evil and insidious way.
>   
>  Interesting.  This is for a toy project, so I'm not too worried,
> but lets say I wanted to do this "correctly" and I was set on using
> IOUArray for some reason. (The Haskell wiki claims that
> StorableArray is slower; is that actually the case?)

it was in 6.4. in 6.6 it has the same speed as IOArray

the Arrays wiki page was written primarily by me and suggestion to use
unsafeCoerce# based solely on the code fragment i just citated. so
this page is broken in that it says primarily about rather old 6.4
version and that it suggests unreliable trick without much
understanding of ghc intrinsics :)


-- 
Best regards,
 Bulat                            mailto:Bulat.Ziganshin at gmail.com



More information about the Haskell-Cafe mailing list