Bulat Ziganshin wrote:
Hello Alberto,
Tuesday, June 3, 2008, 11:27:54 AM, you wrote:
Yes, I will try to write a simple version of Data.Array.ST...
That's right, the correspondence with StorableArray is direct, and
efficient conversion can be easily added to the library. I mentioned the
idea of Data.Array.ST to have also the possibility of writing pure code,
without IO, internally implemented with inplace updates.
STRef/STArray operations are just IORef/IOArray operations imported in
some way/ you can easily import any other operations to ST monad as
far as you use rank-2 types to guarantee that impureness will not
escape the runST call. look into unsafeIOtoST function
Good! So you can easily "hide" the IO operations in the ST monad. I will
definitely look into it.
providing unmovable STUArray variant may be a good idea
Many thanks Bulat!
_______________________________________________
Haskell-Cafe mailing list
[email protected]
http://www.haskell.org/mailman/listinfo/haskell-cafe