packages feed

pqueue 1.3.1 → 1.3.1.1

raw patch · 7 files changed

+28/−18 lines, 7 filesdep ~basedep ~deepseq

Dependency ranges changed: base, deepseq

Files

Data/PQueue/Internals.hs view
@@ -97,7 +97,7 @@   Empty `compare` Empty = EQ   Empty `compare` _ = LT   _ `compare` Empty = GT-  MinQueue n1 x1 q1 `compare` MinQueue n2 x2 q2 = compare x1 x2 `mappend` cmp' q1 q2 where+  MinQueue _n1 x1 q1 `compare` MinQueue _n2 x2 q2 = compare x1 x2 `mappend` cmp' q1 q2 where     cmp' q1 q2 = case (extractHeap q1, extractHeap q2) of       (Just (x1, q1'), Just (x2, q2'))         -> compare x1 x2 `mappend` cmp' q1' q2'
Data/PQueue/Max.hs view
@@ -36,6 +36,7 @@   getMax,   deleteMax,   deleteFindMax,+  delete,   maxView,   -- * Construction operations   singleton,
Data/PQueue/Min.hs view
@@ -1,4 +1,5 @@ {-# LANGUAGE CPP #-}+{-# OPTIONS_GHC -fno-warn-orphans #-}  ----------------------------------------------------------------------------- -- |
Data/PQueue/Prio/Internals.hs view
@@ -27,7 +27,8 @@   foldrWithKeyU,   foldlWithKeyU,   traverseWithKeyU,-  seqSpine+  seqSpine,+  mapForest   ) where  import Control.Applicative (Applicative(..), (<$>))@@ -101,7 +102,7 @@ infixr 6 <>  instance (Ord k, Ord a) => Ord (MinPQueue k a) where-  MinPQ n1 k1 a1 ts1 `compare` MinPQ n2 k2 a2 ts2 =+  MinPQ _n1 k1 a1 ts1 `compare` MinPQ _n2 k2 a2 ts2 =     k1 `compare` k2 <> a1 `compare` a2 <> ts1 `cmpHeap` ts2    where     ts1 `cmpHeap` ts2 = case (extract ts1, extract ts2) of@@ -318,7 +319,7 @@ data MExtract rk k a = No | Yes {-# UNPACK #-} !(Extract rk k a)  incrExtract :: LEq k -> Maybe (BinomTree rk k a) -> Extract (Succ rk) k a -> Extract rk k a-incrExtract (<=) Nothing (Extract k a (Succ t ts) tss)+incrExtract _    Nothing (Extract k a (Succ t ts) tss)   = Extract k a ts (Cons t tss) incrExtract (<=) (Just t) (Extract k a (Succ t' ts) tss)   = Extract k a ts (Skip (incr (<=) (meld (<=) t t') tss))
Data/PQueue/Prio/Max.hs view
@@ -1,4 +1,5 @@ {-# LANGUAGE CPP #-}+{-# OPTIONS_GHC -fno-warn-orphans #-}  ----------------------------------------------------------------------------- -- |@@ -140,9 +141,6 @@ first' :: (a -> b) -> (a, c) -> (b, c) first' f (a, c) = (f a, c) -second' :: (b -> c) -> (a, b) -> (a, c)-second' f (a, b) = (a, f b)- instance Ord k => Monoid (MaxPQueue k a) where   mempty = empty   mappend = union@@ -439,13 +437,13 @@ -- | /O(n)/.  An unordered traversal over a priority queue, in no particular order. -- While there is no guarantee in which order the elements are traversed, the resulting -- priority queue will be perfectly valid.-traverseU :: (Applicative f, Ord b) => (a -> f b) -> MaxPQueue k a -> f (MaxPQueue k b)+traverseU :: (Applicative f) => (a -> f b) -> MaxPQueue k a -> f (MaxPQueue k b) traverseU = traverseWithKeyU . const  -- | /O(n)/.  An unordered traversal over a priority queue, in no particular order. -- While there is no guarantee in which order the elements are traversed, the resulting -- priority queue will be perfectly valid.-traverseWithKeyU :: (Applicative f, Ord b) => (k -> a -> f b) -> MaxPQueue k a -> f (MaxPQueue k b)+traverseWithKeyU :: (Applicative f) => (k -> a -> f b) -> MaxPQueue k a -> f (MaxPQueue k b) traverseWithKeyU f (MaxPQ q) = MaxPQ <$> Q.traverseWithKeyU (f . unDown) q  -- | /O(n)/.  Return all keys of the queue in no particular order.
Data/PQueue/Prio/Min.hs view
@@ -1,4 +1,5 @@ {-# LANGUAGE CPP #-}+{-# OPTIONS_GHC -fno-warn-orphans #-}  ----------------------------------------------------------------------------- -- |@@ -137,12 +138,6 @@  (.:) :: (c -> d) -> (a -> b -> c) -> a -> b -> d (f .: g) x y = f (g x y)--first' :: (a -> b) -> (a, c) -> (b, c)-first' f (a, c) = (f a, c)--second' :: (b -> c) -> (a, b) -> (a, c)-second' f (a, b) = (a, f b)  uncurry' :: (a -> b -> c) -> (a, b) -> c uncurry' f (a, b) = f a b
pqueue.cabal view
@@ -1,5 +1,5 @@ Name:               pqueue-Version:            1.3.1+Version:            1.3.1.1 Category:           Data Structures Author:             Louis Wasserman License:            BSD3@@ -13,13 +13,17 @@ Build-type:         Simple cabal-version:      >= 1.6 extra-source-files: include/Typeable.h+tested-with:        GHC == 7.0.4, GHC == 7.2.2, GHC == 7.6.3, GHC == 7.8.4, GHC == 7.10.1, GHC == 8.0.1  source-repository head   type: git   location: git@github.com:lspitzner/pqueue.git  Library {-  build-depends: base >= 4 && < 4.9, deepseq+  build-depends:+  { base >= 4 && < 4.10+  , deepseq >= 1.3 && < 1.5+  }   exposed-modules:     Data.PQueue.Prio.Min     Data.PQueue.Prio.Max@@ -33,5 +37,15 @@   if impl(ghc) {     extensions: DeriveDataTypeable   }-  ghc-options: -fdicts-strict+  ghc-options: {+    -fdicts-strict+    -Wall+    -fno-warn-name-shadowing+    -fno-warn-unused-imports+  }+ if impl(ghc>=7.8) {+  ghc-options: {+    -fno-warn-inline-rule-shadowing+  }+ } }