module Data.Queue
( NewFifo (..)
, DefaultFifo
, Enqueue (..)
, Dequeue (..)
, DequeueWhere (..)
, PeekQueue (..)
, QueueSize (..)
, module Data.Queue.Instances
, RQueue, mkRQueue
, WQueue, mkWQueue
) where
import Data.Queue.Classes
import Data.Queue.Instances
newDefaultFifoFor :: (DefaultFifo q m a, NewFifo q m) => a -> m q
newDefaultFifoFor _thing = newFifo
newtype RQueue q = RQ q
mkRQueue :: q -> RQueue q
mkRQueue = RQ
instance Dequeue q m a => Dequeue (RQueue q) m a where
dequeue (RQ q) = dequeue q
newtype WQueue q = WQ q
mkWQueue :: q -> WQueue q
mkWQueue = WQ
instance Enqueue q m a => Enqueue (WQueue q) m a where
enqueue (WQ q) = enqueue q