io-sim-0.2.0.0: A pure simulator for monadic concurrency with STM
Safe HaskellNone
LanguageHaskell2010

Control.Monad.IOSim.STM

Description

'io-sim' implementation of TQueue and TBQueue. Unlike the default implementation available in 'io-classes' they are using a single TVar, which simplifies the implementation of traceTQueue and traceTBQueue methods.

Documentation

newtype TQueueDefault m a Source #

Constructors

TQueue (TVar m ([a], [a])) 

traceTQueueDefaultMonadTraceSTM m ⇒ proxy m → TQueueDefault m a → (Maybe [a] → [a] → InspectMonad m TraceValue) → STM m () Source #

writeTQueueDefaultMonadSTM m ⇒ TQueueDefault m a → a → STM m () Source #

data TBQueueDefault m a Source #

Constructors

TBQueue !(TVar m ([a], Natural, [a], Natural)) !Natural 

traceTBQueueDefaultMonadTraceSTM m ⇒ proxy m → TBQueueDefault m a → (Maybe [a] → [a] → InspectMonad m TraceValue) → STM m () Source #

writeTBQueueDefaultMonadSTM m ⇒ TBQueueDefault m a → a → STM m () Source #