[Haskell-cafe] ST not strict enough?
Tristan Ravitch
travitch at cs.wisc.edu
Wed Nov 16 21:20:00 CET 2011
On Wed, Nov 16, 2011 at 12:16:34PM -0800, Johan Tibell wrote:
> Just double checked. modifySTRef is too lazy:
>
> -- |Mutate the contents of an 'STRef'
> modifySTRef :: STRef s a -> (a -> a) -> ST s ()
> modifySTRef ref f = writeSTRef ref . f =<< readSTRef ref
>
> We need Data.STRef.Strict
That would be awesome
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: not available
URL: <http://www.haskell.org/pipermail/haskell-cafe/attachments/20111116/549dec86/attachment.pgp>
More information about the Haskell-Cafe
mailing list