packages feed

fingertree-psqueue 0.1 → 0.2

raw patch · 2 files changed

+7/−6 lines, 2 filesPVP ok

version bump matches the API change (PVP)

API changes (from Hackage documentation)

Files

Data/FingerTree/PSQueue.hs view
@@ -16,7 +16,8 @@                         Measured (..), split, viewl, (><)) import Data.Monoid import Data.Ord-import Data.List+import Data.List hiding (lookup)+import Prelude hiding (lookup)  data Prio k a = Prio (Binding k a) | PMax   deriving (Eq, Ord, Show)@@ -35,8 +36,8 @@         mappend x NoKey = x         mappend x y     = y -geqKey k NoKey = False-geqKey k (Key k') = k >= k'+leqKey k NoKey = False+leqKey k (Key k') = k <= k'  data Binding k p = k :-> p   deriving (Eq, Ord, Show)@@ -93,7 +94,7 @@ -- or update a priority in a queue. alter :: (Ord k, Ord p) => (Maybe p -> Maybe p) -> k -> PSQ k p -> PSQ k p alter f k (PSQ q) =-  PSQ $ let (u,v) = split (geqKey k . kpsKey) q+  PSQ $ let (u,v) = split (leqKey k . kpsKey) q          in case viewl v of               EmptyL -> case f Nothing of                            Nothing -> q@@ -101,7 +102,7 @@               (k' :-> p') :< v'                 | k == k'   -> case f (Just p') of                                  Nothing -> u >< v'-                                 Just p  -> u >< ((k :-> p') <| v')+                                 Just p  -> u >< ((k :-> p) <| v')                 | otherwise -> case f Nothing of                                  Nothing -> u >< v                                  Just p  -> u >< ((k :-> p) <| v)
fingertree-psqueue.cabal view
@@ -1,5 +1,5 @@ name:                fingertree-psqueue
-version:             0.1
+version:             0.2
 cabal-version:       >= 1.2
 build-type:          Simple