metronome-0.1.1: Time Synchronized execution.

Copyright(c) Paolo Veronelli 2012
LicenseBSD-style (see the file LICENSE)
Maintainerpaolo.veronelli@gmail.com
Stabilityunstable
Portabilitynot portable (requires STM)
Safe HaskellSafe
LanguageHaskell98

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 where Source

uniforming class for STM or IO

Methods

stmorio :: STM a -> m a Source

class RW m z where Source

class to uniform reading and writing

Methods

rd :: z a -> m a Source

read a z

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

modify a z

Instances

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

modify a cell z under STM or IO

var Source

Arguments

:: STMOrIO m 
=> a

initial value

-> m (TVar a) 

new TVar

chan Source

Arguments

:: STMOrIO m 
=> a

type proxy value

-> m (TChan a) 

new TChan