Proposal #3537: Add missing NFData instances to parallel

Gregory Collins greg at gregorycollins.net
Wed Sep 23 11:52:54 EDT 2009


Roel van Dijk <vandijk.roel at gmail.com> writes:

> I would like some feedback on the instances for STRef and
> IORef. Does it make sense to have them? I used a trick to force
> their evaluation since their constructors are not exported.

This might be "dirty" but what about this instead?

    instance (NFData a) => NFData (Data.IORef.IORef a) where
        rnf r = unsafePerformIO $ modifyIORef r (`using` rnf)

G.
-- 
Gregory Collins <greg at gregorycollins.net>


More information about the Libraries mailing list