
It's a bit orthogonal, but since you brought up lazy IO I thought it was
worth mentioning, as shallow evaluation is insufficient.
On 09:15, Thu, Jan 8, 2015 David Feuer
deepseq is somewhat orthogonal:
shallow: v $! return v deep: v $!! return v shallow: evaluate v >>= return deep: evaluate (force v) >>= return
AKAIK neither one is necessarily safe. You need something like deepseq to fully evaluate the lazy structure.
If you are sure that evaluation to WHNF is sufficient for performing all lazy IO, then I think either evaluate or ($!) will work.
evaluate is probably to be preferred if IO is available, similar to
throwIO. However I think idioms with seq and ($!) are so common that
On Thu, Jan 8, 2015 at 12:11 PM, John Lato
wrote: throw vs they need to be supported too. After all, you may have just a 'Monad m' context.
John