summaryrefslogtreecommitdiff
path: root/src/Data/Wrapper
diff options
context:
space:
mode:
authorjoe <joe@jerkface.net>2017-02-01 03:21:52 -0500
committerjoe <joe@jerkface.net>2017-02-01 03:21:52 -0500
commitc51e64666b672637843a04c2f279d7d0c9eed01c (patch)
treed6f50018659ac3c5c3d72ee9bde3824514bd9f6a /src/Data/Wrapper
parent0d1de683de78a70ce9c054b444bb6f19c39d112c (diff)
New improved iterative search algorithm.
Diffstat (limited to 'src/Data/Wrapper')
-rw-r--r--src/Data/Wrapper/PSQ.hs6
1 files changed, 5 insertions, 1 deletions
diff --git a/src/Data/Wrapper/PSQ.hs b/src/Data/Wrapper/PSQ.hs
index e8fa2d98..2c08011b 100644
--- a/src/Data/Wrapper/PSQ.hs
+++ b/src/Data/Wrapper/PSQ.hs
@@ -15,10 +15,14 @@ type Binding k p = (k,p,())
15pattern (:->) :: k -> p -> Binding k p 15pattern (:->) :: k -> p -> Binding k p
16pattern k :-> p <- (k,p,()) where k :-> p = (k,p,()) 16pattern k :-> p <- (k,p,()) where k :-> p = (k,p,())
17 17
18key :: Binding k v -> k 18key :: Binding k p -> k
19key (k,p,v) = k 19key (k,p,v) = k
20{-# INLINE key #-} 20{-# INLINE key #-}
21 21
22prio :: Binding k p -> p
23prio (k,p,v) = p
24{-# INLINE prio #-}
25
22insert :: (Ord k, Ord p) => k -> p -> PSQ k p -> PSQ k p 26insert :: (Ord k, Ord p) => k -> p -> PSQ k p -> PSQ k p
23insert k p q = OrdPSQ.insert k p () q 27insert k p q = OrdPSQ.insert k p () q
24{-# INLINE insert #-} 28{-# INLINE insert #-}