Safe Haskell | Safe-Inferred |
---|---|
Language | Haskell2010 |
Synopsis
- class Monad m => MonadTime m where
- getCurrentTime :: m UTCTime
- threadDelay :: Int -> m ()
Documentation
class Monad m => MonadTime m where Source #
A class interface with overridable time implementation.
Import DefaultInstance
for the default
implementation using the real underlying time functions.
See SimulatedTime
for an instance
that allows to control time.
getCurrentTime :: m UTCTime Source #
threadDelay :: Int -> m () Source #
Instances
MonadTime IO Source # | |
Defined in Control.Monad.Time.DefaultInstance getCurrentTime :: IO UTCTime Source # threadDelay :: Int -> IO () Source # | |
(MonadTime m, MonadTrans t, Monad (t m)) => MonadTime (t m) Source # | |
Defined in Control.Monad.Time getCurrentTime :: t m UTCTime Source # threadDelay :: Int -> t m () Source # | |
MonadIO m => MonadTime (SimulatedTimeT m) Source # | |
Defined in Control.Monad.Trans.SimulatedTime getCurrentTime :: SimulatedTimeT m UTCTime Source # threadDelay :: Int -> SimulatedTimeT m () Source # | |
MonadIO m => MonadTime (RealTimeT m) Source # | |
Defined in Control.Monad.Trans.SimulatedTime getCurrentTime :: RealTimeT m UTCTime Source # threadDelay :: Int -> RealTimeT m () Source # |