RE: safe array freezing?

2004-01-05 Thread Simon Marlow
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

Re: safe array freezing?

2003-12-31 Thread Hal Daume III
afaik, this is fine. in fact, i use this idiom very frequently, so if it's bad, i've never seen the badness of it. On Tue, 30 Dec 2003, John Meacham wrote: 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

safe array freezing?

2003-12-30 Thread John Meacham
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'.