[Haskell-cafe] Re: hmatrix
Alberto Ruiz
aruiz at um.es
Tue Jun 3 04:56:50 EDT 2008
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!
More information about the Haskell-Cafe
mailing list