isevaluated-0.3.0.2: Check whether a value has been evaluated

Portabilityghc only
Stabilityexperimental
MaintainerBertram Felgenhauer <int-e@gmx.de>
Safe HaskellSafe-Infered

Data.IsEvaluated

Description

isEvaluated allows checking for expressions that have already been reduced to weak heaf normal form. This can be useful for racing computations against one another; if one computation can be shown to terminate instantly, there's no need to set up any threads for the race.

Synopsis

Documentation

isEvaluated :: a -> IO BoolSource

If isEvaluated a returns True, the given value is in whnf.

It may produce false negatives.