1-- | An 'OrdPSQ' uses the 'Ord' instance of the key type to build a priority 2-- search queue. 3-- 4-- It is based on Ralf Hinze's work. 5-- 6-- * Hinze, R., A Simple Implementation Technique for Priority Search Queues, 7-- ICFP 2001, pp. 110-121 8-- 9-- <http://citeseer.ist.psu.edu/hinze01simple.html> 10-- 11-- This means it is similar to the 12-- <http://hackage.haskell.org/package/PSQueue-1.1 PSQueue> package but 13-- our benchmarks showed it perform quite a bit faster. 14{-# LANGUAGE Safe #-} 15{-# LANGUAGE ScopedTypeVariables #-} 16module Data.OrdPSQ 17 ( -- * Type 18 OrdPSQ 19 20 -- * Query 21 , null 22 , size 23 , member 24 , lookup 25 , findMin 26 27 -- * Construction 28 , empty 29 , singleton 30 31 -- * Insertion 32 , insert 33 34 -- * Delete/Update 35 , delete 36 , deleteMin 37 , alter 38 , alterMin 39 40 -- * Conversion 41 , fromList 42 , toList 43 , toAscList 44 , keys 45 46 -- * Views 47 , insertView 48 , deleteView 49 , minView 50 , atMostView 51 52 -- * Traversals 53 , map 54 , unsafeMapMonotonic 55 , fold' 56 57 -- * Validity check 58 , valid 59 ) where 60 61import Prelude hiding (foldr, lookup, map, null) 62 63import Data.OrdPSQ.Internal 64