Add a new MonadInspectMVar class (similar to MonadInspectSTM) with an inspectMVar function for accessing an MVar in an underlying monad (if applicable). This is mainly useful for io-sim, since the underlying monad is ST. IO has no underlying monad, so the provided instance for IO defaults inspectMVar to tryReadMVar.
Add a new
MonadInspectMVar
class (similar toMonadInspectSTM
) with aninspectMVar
function for accessing anMVar
in an underlying monad (if applicable). This is mainly useful forio-sim
, since the underlying monad isST
.IO
has no underlying monad, so the provided instance forIO
defaultsinspectMVar
totryReadMVar
.