- class Monad m => NewFifo q m where
- newFifo :: m q
- class Monad m => DefaultFifo q m a | q -> a, m a -> q
- class Monad m => Enqueue q m a | q -> a where
- class Monad m => Dequeue q m a | q -> a where
- class Monad m => DequeueWhere q m a | q -> a where
- class Monad m => PeekQueue q m a | q -> a where
- class Monad m => QueueSize q m where
- module Data.Queue.Instances
- data RQueue q
- mkRQueue :: q -> RQueue q
- data WQueue q
- mkWQueue :: q -> WQueue q
Construct a new FIFO queue.
A type class carrying an altered set of functional dependencies used to constrain queues when the type of the queue never escapes far enough for a more deliberate choice to be made.
return the whole contents of the queue (if possible) without altering the queue's contents. Obviously in cases where this can't be done lazily this can be a very expensive operation.
peek a specified number of items off the queue. The default implementation is hideously wasteful in cases where peekQueue is not able to get the contents lazily.
RQueue : read-only newtype wrapper for arbitrary queues
WQueue : write-only newtype wrapper for arbitrary queues