metronome-0.1: Time Synchronized execution.

Portabilitynot portable (requires STM)
Stabilityunstable
Maintainerpaolo.veronelli@gmail.com
Safe HaskellSafe-Infered

Control.Concurrent.STMOrIO

Description

Unifying functions of TVar's and TChans in STM and IO via atomically.

Synopsis

Documentation

class (Functor m, Monad m) => STMOrIO m whereSource

uniforming class for STM or IO

Methods

stmorio :: STM a -> m aSource

Instances

class RW m z whereSource

class to uniform reading and writing

Methods

rd :: z a -> m aSource

read a z

wr :: z a -> a -> m ()Source

modify a z

Instances

STMOrIO t => RW t TChan 
STMOrIO t => RW t TVar 

md :: (Monad m, RW m z) => z a -> (a -> a) -> m ()Source

modify a cell z under STM or IO

varSource

Arguments

:: STMOrIO m 
=> a

initial value

-> m (TVar a) 

new TVar

chanSource

Arguments

:: forall m a . STMOrIO m 
=> a

type proxy value

-> m (TChan a) 

new TChan