pqueue-mtl-1.0.6: Fully encapsulated monad transformers with queuelike functionality.Source codeContentsIndex
Control.Monad.Queue.QueueT
Description
A monad transformer allowing a purely functional queue implementation (specifically, implementing the Queuelike abstraction) to be used in a monadic, single-threaded fashion.
Synopsis
newtype QueueT q m a = QueueT {
runQT :: StateT q m a
}
newtype QueueM q a = QueueM {
runQM :: State q a
}
type PQueueT e = QueueT (PQueue e)
type PQueueM e = QueueM (PQueue e)
type FibQueueT e = QueueT (FQueue e)
type FibQueueM e = QueueM (FQueue e)
type SkewQueueT e = QueueT (SkewQueue e)
type SkewQueueM e = QueueM (SkewQueue e)
type IntQueueT = QueueT IntQueue
type IntQueueM = QueueM IntQueue
runQueueT :: (Monad m, Queuelike q) => QueueT q m a -> m a
runQueueTOn :: (Monad m, Queuelike q) => QueueT q m a -> [QueueKey q] -> m a
runQueueM :: Queuelike q => QueueM q a -> a
runQueueMOn :: Queuelike q => QueueM q a -> [QueueKey q] -> a
Documentation
newtype QueueT q m a Source
A monad transformer granting the underlying monad m access to single-threaded actions on a queue.
Constructors
QueueT
runQT :: StateT q m a
show/hide Instances
newtype QueueM q a Source
A monad controlling single-threaded access to a queue.
Constructors
QueueM
runQM :: State q a
show/hide Instances
type PQueueT e = QueueT (PQueue e)Source
type PQueueM e = QueueM (PQueue e)Source
type FibQueueT e = QueueT (FQueue e)Source
type FibQueueM e = QueueM (FQueue e)Source
type SkewQueueT e = QueueT (SkewQueue e)Source
type SkewQueueM e = QueueM (SkewQueue e)Source
type IntQueueT = QueueT IntQueueSource
type IntQueueM = QueueM IntQueueSource
runQueueT :: (Monad m, Queuelike q) => QueueT q m a -> m aSource
Unwraps a queue transformer, initializing it with an empty queue.
runQueueTOn :: (Monad m, Queuelike q) => QueueT q m a -> [QueueKey q] -> m aSource
Unwraps a queue transformer, initializing it with a queue with the specified contents.
runQueueM :: Queuelike q => QueueM q a -> aSource
Executes a computation in a queue monad, starting with an empty queue.
runQueueMOn :: Queuelike q => QueueM q a -> [QueueKey q] -> aSource
Executes a computation in a queue monad, starting with a queue with the specified contents.
Produced by Haddock version 2.4.1