Safe Haskell | None |
---|---|
Language | Haskell2010 |
Synopsis
- class Monad m => MonadDelay (m :: Type -> Type) where
- threadDelay :: Int -> m ()
- class (MonadDelay m, MonadSTM m) => MonadTimer (m :: Type -> Type) where
Documentation
class Monad m => MonadDelay (m :: Type -> Type) where Source #
A typeclass to delay current thread.
threadDelay :: Int -> m () Source #
Suspends the current thread for a given number of microseconds (GHC only).
See threadDelay
.
Instances
MonadDelay IO Source # | |
Defined in Control.Monad.Class.MonadTimer threadDelay :: Int -> IO () Source # | |
MonadDelay m => MonadDelay (ReaderT r m) Source # | |
Defined in Control.Monad.Class.MonadTimer threadDelay :: Int -> ReaderT r m () Source # |
class (MonadDelay m, MonadSTM m) => MonadTimer (m :: Type -> Type) where Source #
A typeclass providing utilities for timeouts.
registerDelay :: Int -> m (TVar m Bool) Source #
See registerDelay
.
timeout :: Int -> m a -> m (Maybe a) Source #
See timeout
.
Instances
MonadTimer IO Source # | |
MonadTimer m => MonadTimer (ReaderT r m) Source # | |