data-effects-0.1.2.0: A basic framework for effect systems based on effects represented by GADTs.
Copyright(c) 2024 Yamada Ryo
LicenseMPL-2.0 (see the file LICENSE)
Maintainerymdfield@outlook.jp
Stabilityexperimental
Portabilityportable
Safe HaskellSafe-Inferred
LanguageGHC2021

Data.Effect.Concurrent.Timer

Description

 

Documentation

data Timer a where Source #

Constructors

Clock :: Timer DiffTime 
Sleep :: DiffTime -> Timer () 

pattern LSleep :: () => (a ~ (), ()) => DiffTime -> LiftIns Timer f a Source #

pattern LClock :: () => (a ~ DiffTime, ()) => LiftIns Timer f a Source #

sleep'' :: forall key f. SendInsBy key Timer f => DiffTime -> f () Source #

sleep' :: forall tag f. SendIns (Tag Timer tag) f => DiffTime -> f () Source #

sleep :: forall f. SendIns Timer f => DiffTime -> f () Source #

clock'' :: forall key f. SendInsBy key Timer f => f DiffTime Source #

clock' :: forall tag f. SendIns (Tag Timer tag) f => f DiffTime Source #

clock :: forall f. SendIns Timer f => f DiffTime Source #

withElapsedTime :: (Timer <: m, Monad m) => (m DiffTime -> m a) -> m a Source #

measureTime :: (Timer <: m, Monad m) => m a -> m (DiffTime, a) Source #

runCyclic :: (Timer <: m, Monad m) => m DiffTime -> m () -> m a Source #

runPeriodic :: (Timer <: m, Monad m) => DiffTime -> m () -> m a Source #

periodicTimer :: forall m a. (Timer <: m, Yield () () <: m, Monad m) => DiffTime -> m a Source #

cyclicTimer :: forall m a. (Timer <: m, Yield () DiffTime <: m, Monad m) => m a Source #

data CyclicTimer a where Source #

Constructors

Wait :: DiffTime -> CyclicTimer () 

pattern LWait :: () => (a ~ (), ()) => DiffTime -> LiftIns CyclicTimer f a Source #

wait'' :: forall key f. SendInsBy key CyclicTimer f => DiffTime -> f () Source #

wait' :: forall tag f. SendIns (Tag CyclicTimer tag) f => DiffTime -> f () Source #

wait :: forall f. SendIns CyclicTimer f => DiffTime -> f () Source #