modifyIORef lazy? (was Re: BLACKHOLE in heap profile)

Tom Pledger Tom.Pledger@peace.com
Sun, 20 Apr 2003 09:35:11 +1200


Tomasz Zielonka writes:
 | On Sat, Apr 19, 2003 at 12:29:13PM +1200, Tom Pledger wrote:
 | > You should get the same result with
 | > 
 | >     modifyIORef r $! <E>
 | 
 | But this will only force evaluation of the function passed to
 | modifyIORef, won't it?

You're right.  My mistake, sorry.

<E> is already in Weak Head Normal Form (because it's a function), so
the ($!) has no effect.