polysemy-time-0.1.1.0: Polysemy effect for time
Safe HaskellNone
LanguageHaskell2010

Polysemy.Time.At

Synopsis

Documentation

dateCurrentRelative :: forall diff t d r. Torsor t diff => Members [Time t d, Embed IO, State (t, t)] r => Sem r t Source #

Determine the current time adjusted for the difference between a custom instant and the time at which the program was started.

interpretTimeAtWithStart :: forall diff t d r a. Torsor t diff => TimeUnit diff => HasDate t d => Members [Time t d, Embed IO, State (t, t)] r => Sem r a -> Sem r a Source #

Given real and adjusted start time, change all calls to Now and Today to be relative to that start time. This needs to be interpreted with a vanilla interpreter for Time once more.

interpretTimeAt :: forall (diff :: *) t d r a. TimeUnit diff => Torsor t diff => HasDate t d => Members [Time t d, Embed IO] r => t -> Sem r a -> Sem r a Source #

Interpret Time so that the time when the program starts is startAt.