isevaluated-0.2: Check whether a value has been evaluated




isEvaluated :: a -> IO BoolSource

Checks whether Control.Exception.evaluate (or rwhnf) would do no work when applied to the value. May produce false negatives (where isEvaluated thinks it would, but it actually wouldn't) in some cases.

Use case: if isEvaluated foo returns True, then evaluate foo will never throw an exception, or indeed take more than constant (small) time.