> so, A common idiom when using Control.Monad.ST is to do some
> complicated, state using computation to compute a big array which is
> then used purely functionally as a read-only array in the rest of the
> program.
>
> to avoid the cost of copying the array at the end, we are
> forced to use
> 'unsafeFreeze'. it occurs to me that this particular idiom
> can actually
> be done safely, by adding the following...
>
> runSTArray :: (forall s . (ST s (STArray s i e))) -> Array i e
> runSTUArray :: (forall s . (ST s (STUArray s i e))) -> UArray i e
Good idea. I'll add these to Data.Array.ST.
Cheers,
Simon
_______________________________________________
Haskell mailing list
[EMAIL PROTECTED]
http://www.haskell.org/mailman/listinfo/haskell