queuelike-1.0.9: A library of queuelike data structures, both functional and stateful.

Data.MQueue.Class

Documentation

class Monad m => MQueue q m whereSource

Associated Types

type MQueueKey q :: *Source

Methods

newQueue :: m qSource

push :: q -> MQueueKey q -> m ()Source

pushAll :: q -> [MQueueKey q] -> m ()Source

pop :: q -> m (Maybe (MQueueKey q))Source

pop_ :: q -> m ()Source

peek :: q -> m (Maybe (MQueueKey q))Source

isEmpty :: q -> m BoolSource

Instances

MonadIO m => MQueue (Chan a) m 
(MonadIO m, MQueue q IO) => MQueue (SyncMQ q) m 
(MonadIO m, IQueue q) => MQueue (SyncQ q) m 
(StateThread m ~ s, Monad m, MonadST m, Ord e) => MQueue (Heap s e) m