úÎ?³<þ4      !"#$%& ' ( ) * + , - . / 0 1 2 3 ÿQA generic type class encapsulating a generic queuelike structure, that supports single-insertion and single-extraction; this abstraction includes priority queues, stacks, and FIFO queues. There are many minimal implementations, so each method lists the prerequisites for its default implementation. Most implementations will implement , ( and  ) or , ( and ) or , and  . JInserts a single element into the queue. The default implementation uses   and . JInserts several elements into the queue. The default implementation uses O. (In some cases, it may be advantageous to override this implementation with xs `` q = q ` `  xs.) xAttempts to extract an element from the queue; if the queue is empty, returns Nothing. The default implementation uses  and . €Gets the element that will next be extracted from the queue, if there is an element available. The default implementation uses . ^Deletes an element from the queue, if the queue is nonempty. The default implementation uses . <Constructs an empty queue. The default implementation uses . KConstructs a queue with a single element. The default implementation uses  and . ZConstructs a queue with all of the elements in the list. The default implementation uses  and . =Gets the size of the queue. The default implementation uses  . ?Checks if the queue is empty. The default implementation uses . HExtracts every element from the queue. The default implementation uses . gExtracts every element from the queue, with no guarantees upon order. The default implementation uses  . “Merges two queues so that the contents of the second queue are inserted into the first queue in extraction order. The default implementation uses   and .   KWrapper around a generic queue that reverses the ordering on its elements.    ZTypeclass abstraction of a monad with access to a mutable queue. Minimal implementation:  or , ,  or , . Type that only orders on the key, ignoring the value completely; frequently useful in priority queues, so made available here.   !NMonad transformer based on an array implementation of a standard binary heap. "BMonad based on an array implementation of a standard binary heap. #Runs an "* computation starting with an empty heap. 4Runs an "¾ computation starting with a heap initialized to hold the specified list. (Since this can be done with linear preprocessing, this is more efficient than inserting the elements one by one.) S runHeapTOn :: (Ord e) => (forall s . HeapM s e a) -- ^ The transformer operation. Y -> Int -- ^ The starting size of the heap (must be equal to the length of the list)  -> [e]' -- ^ The initial contents of the heap  -> a b runHeapTOn m n l = runArrayM_ 16 $ flip evalStateT n $ do mapM_ (uncurry unsafeWriteAt) (zip [0..] l)  mapM_ ( -i -> unsafeReadAt i >>= heapDown n i) [0..n-1]  execHeapM m !"#$%"!#$% *7A monad controlling single-threaded access to a queue. -2A monad transformer granting the underlying monad m/ access to single-threaded actions on a queue. 0BUnwraps a queue transformer, initializing it with an empty queue. 1WUnwraps a queue transformer, initializing it with a queue with the specified contents. 2GExecutes a computation in a queue monad, starting with an empty queue. 3\Executes a computation in a queue monad, starting with a queue with the specified contents. &'()*+,-./0123&'()*+,-./0123 !"#$%&'()*+,-./0123  !"#$%&'()*+,-./01235  !"#$%&'()*+,,-./01 2 3 4 5 6 6 7 8 8 9 : ; < =>?pqueue-mtl-1.0.2Data.Queue.ClassData.Queue.StackData.Queue.QueueData.Queue.ReverseQueueData.Queue.FibQueueData.Queue.PQueueControl.Monad.Queue.ClassControl.Monad.Queue.HeapControl.Monad.Queue.QueueTData.Queue.Instances Data.QueueControl.Monad.Queue.InstancesControl.Monad.Queue Queuelikeinsert insertAllextractpeekdeleteempty singletonfromListsizeisEmptytoListtoList_mergemergeAllStackQueue ReverseQueueDownunDownFQueuePQueue MonadQueue queueInsertqueueInsertAll queueExtract queueDelete queuePeek queueEmpty queueSize:->HeapTHeapMrunHeapM runHeapMIOrunHeapT FibQueueM FibQueueTPQueueMPQueueTQueueMrunQMQueueTrunQT runQueueT runQueueTOn runQueueM runQueueMOn ensureHeap