[Haskell-cafe] Re: mapping unfreeze over an IntMap of IOUArrays

2008-11-11 Thread Chad Scherrer
Don Stewart dons at galois.com writes: Hmm. So you'd need to construct a new IntMap, made by fmap'ping unsafeFreeze over each element of the old map. I guess if we had a Traversable instance for Data.IntMap things would be just fine. Would this be a bad thing in any way? Chad

Re: [Haskell-cafe] Re: mapping unfreeze over an IntMap of IOUArrays

2008-11-11 Thread Ross Paterson
On Tue, Nov 11, 2008 at 07:39:53PM +, Chad Scherrer wrote: Don Stewart dons at galois.com writes: Hmm. So you'd need to construct a new IntMap, made by fmap'ping unsafeFreeze over each element of the old map. I guess if we had a Traversable instance for Data.IntMap things would be just

[Haskell-cafe] Re: mapping unfreeze over an IntMap of IOUArrays

2008-11-11 Thread Chad Scherrer
Don Stewart dons at galois.com writes: Hmm. So you'd need to construct a new IntMap, made by fmap'ping unsafeFreeze over each element of the old map. For now I'll just do IntMap.map (unsafePerformIO . unsafeFreeze) Hopefully this won't come back to bite me Thanks! Chad