summaryrefslogtreecommitdiff
path: root/src/Data/Wrapper
diff options
context:
space:
mode:
authorjoe <joe@jerkface.net>2017-11-05 03:43:02 -0500
committerjoe <joe@jerkface.net>2017-11-05 03:43:02 -0500
commit0658b07e68eed370c790f74db7d67f1496134b43 (patch)
treea459db44ee971c115fe4953929ebf12cf54e2287 /src/Data/Wrapper
parent8039d812b7ea8ae566f8873452ac34597336ddfc (diff)
Tox: Shared secrets cache.
Diffstat (limited to 'src/Data/Wrapper')
-rw-r--r--src/Data/Wrapper/PSQ.hs5
1 files changed, 5 insertions, 0 deletions
diff --git a/src/Data/Wrapper/PSQ.hs b/src/Data/Wrapper/PSQ.hs
index 58a6f624..631af6ec 100644
--- a/src/Data/Wrapper/PSQ.hs
+++ b/src/Data/Wrapper/PSQ.hs
@@ -69,6 +69,11 @@ singleton :: (PSQKey k, Ord p) => k -> p -> PSQ k p
69singleton k p = Q.singleton k p () 69singleton k p = Q.singleton k p ()
70{-# INLINE singleton #-} 70{-# INLINE singleton #-}
71 71
72singleton' :: (PSQKey k, Ord p) => k -> v -> p -> PSQ' k p v
73singleton' k v p = Q.singleton k p v
74{-# INLINE singleton' #-}
75
76
72minView :: (PSQKey k, Ord p) => PSQ' k p v -> Maybe (Binding' k p v, PSQ' k p v) 77minView :: (PSQKey k, Ord p) => PSQ' k p v -> Maybe (Binding' k p v, PSQ' k p v)
73minView q = fmap (\(k,p,v,q') -> (Binding k v p, q')) $ Q.minView q 78minView q = fmap (\(k,p,v,q') -> (Binding k v p, q')) $ Q.minView q
74{-# INLINE minView #-} 79{-# INLINE minView #-}