Safe Haskell | None |
---|---|
Language | Haskell2010 |
Synopsis
- data Time (time :: Type) (date :: Type) :: Effect where
- setDate :: forall t d r. MemberWithError (Time t d) r => d -> Sem r ()
- adjust :: forall t d r u1 u2. (MemberWithError (Time t d) r, AddTimeUnit t u1 u2) => u1 -> Sem r ()
- setTime :: forall t d r. MemberWithError (Time t d) r => t -> Sem r ()
- sleep :: forall t d r u. (MemberWithError (Time t d) r, TimeUnit u) => u -> Sem r ()
- today :: forall t d r. MemberWithError (Time t d) r => Sem r d
- now :: forall t d r. MemberWithError (Time t d) r => Sem r t
Documentation
data Time (time :: Type) (date :: Type) :: Effect where Source #
The Time effect.
Now :: Time t d m t | Produce the current time, possibly relative to what was set with |
Today :: Time t d m d | Produce the current date, possibly relative to what was set with |
Sleep :: TimeUnit u => u -> Time t d m () | Suspend the current computation for the specified time span. |
SetTime :: t -> Time t d m () | Set the current time, if the interpreter supports it. |
Adjust :: AddTimeUnit t u1 u2 => u1 -> Time t d m () | Adjust the current time relatively, if the interpreter supports it. |
SetDate :: d -> Time t d m () | Set the current date, if the interpreter supports it. |
Instances
type DefiningModule Time Source # | |
Defined in Polysemy.Time.Data.Time type DefiningModule Time = "Polysemy.Time.Data.Time" |