Safe Haskell | None |
---|---|
Language | GHC2021 |
Polysemy.Time.Effect.Time
Description
Time effect, Internal
Synopsis
- data Time time date (a :: Type -> Type) b where
- Now :: forall time date (a :: Type -> Type). Time time date a time
- Today :: forall time date (a :: Type -> Type). Time time date a date
- Sleep :: forall u time date (a :: Type -> Type). TimeUnit u => u -> Time time date a ()
- SetTime :: forall time date (a :: Type -> Type). time -> Time time date a ()
- Adjust :: forall u1 time date (a :: Type -> Type). TimeUnit u1 => u1 -> Time time date a ()
- SetDate :: forall date time (a :: Type -> Type). date -> Time time date a ()
- now :: forall t d (r :: EffectRow). Member (Time t d) r => Sem r t
- today :: forall t d (r :: EffectRow). Member (Time t d) r => Sem r d
- sleep :: forall t d u (r :: EffectRow). (TimeUnit u, Member (Time t d) r) => u -> Sem r ()
- setTime :: forall t d (r :: EffectRow). Member (Time t d) r => t -> Sem r ()
- adjust :: forall t d u1 u2 (r :: EffectRow). (AddTimeUnit t u1 u2, Member (Time t d) r) => u1 -> Sem r ()
- setDate :: forall t d (r :: EffectRow). Member (Time t d) r => d -> Sem r ()
Documentation
data Time time date (a :: Type -> Type) b where Source #
The Time effect.
Constructors
Now :: forall time date (a :: Type -> Type). Time time date a time | Produce the current time, possibly relative to what was set with |
Today :: forall time date (a :: Type -> Type). Time time date a date | Produce the current date, possibly relative to what was set with |
Sleep :: forall u time date (a :: Type -> Type). TimeUnit u => u -> Time time date a () | Suspend the current computation for the specified time span. |
SetTime :: forall time date (a :: Type -> Type). time -> Time time date a () | Set the current time, if the interpreter supports it. |
Adjust :: forall u1 time date (a :: Type -> Type). TimeUnit u1 => u1 -> Time time date a () | Adjust the current time relatively, if the interpreter supports it. |
SetDate :: forall date time (a :: Type -> Type). date -> Time time date a () | Set the current date, if the interpreter supports it. |
sleep :: forall t d u (r :: EffectRow). (TimeUnit u, Member (Time t d) r) => u -> Sem r () Source #
Suspend the current computation for the specified time span.
setTime :: forall t d (r :: EffectRow). Member (Time t d) r => t -> Sem r () Source #
Set the current time, if the interpreter supports it.