NFData

Roel van Dijk vandijk.roel at gmail.com
Mon Apr 20 12:09:35 EDT 2009


For a package I released recently I had to define the following operators:

-- |Very strict monadic bind
(>>=|) :: (Monad m, NFData a) => m a -> (a -> m b) -> m b
m >>=| f = m >>= f $| rnf

(>>|) :: (Monad m, NFData a) => m a -> m b -> m b
m1 >>| m2 = m1 >>=| const m2

It would be nice if I could drop the dependency on parallel.


More information about the Libraries mailing list