module Control.Monad.Class.MonadTest (MonadTest (..)) where

import           Control.Monad.Reader

-- | A helper monad for /IOSimPOR/.
class Monad m => MonadTest m where
  -- | mark a thread for schedule exploration.  All threads that are forked by
  -- it are also included in the exploration.
  --
  exploreRaces :: m ()
  exploreRaces = forall (m :: * -> *) a. Monad m => a -> m a
return ()

instance MonadTest IO

instance MonadTest m => MonadTest (ReaderT e m) where
  exploreRaces :: ReaderT e m ()
exploreRaces = forall (t :: (* -> *) -> * -> *) (m :: * -> *) a.
(MonadTrans t, Monad m) =>
m a -> t m a
lift forall (m :: * -> *). MonadTest m => m ()
exploreRaces