diff options
author | joe <joe@jerkface.net> | 2017-11-05 03:43:02 -0500 |
---|---|---|
committer | joe <joe@jerkface.net> | 2017-11-05 03:43:02 -0500 |
commit | 0658b07e68eed370c790f74db7d67f1496134b43 (patch) | |
tree | a459db44ee971c115fe4953929ebf12cf54e2287 /src/Data/Wrapper/PSQ.hs | |
parent | 8039d812b7ea8ae566f8873452ac34597336ddfc (diff) |
Tox: Shared secrets cache.
Diffstat (limited to 'src/Data/Wrapper/PSQ.hs')
-rw-r--r-- | src/Data/Wrapper/PSQ.hs | 5 |
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 | |||
69 | singleton k p = Q.singleton k p () | 69 | singleton k p = Q.singleton k p () |
70 | {-# INLINE singleton #-} | 70 | {-# INLINE singleton #-} |
71 | 71 | ||
72 | singleton' :: (PSQKey k, Ord p) => k -> v -> p -> PSQ' k p v | ||
73 | singleton' k v p = Q.singleton k p v | ||
74 | {-# INLINE singleton' #-} | ||
75 | |||
76 | |||
72 | minView :: (PSQKey k, Ord p) => PSQ' k p v -> Maybe (Binding' k p v, PSQ' k p v) | 77 | minView :: (PSQKey k, Ord p) => PSQ' k p v -> Maybe (Binding' k p v, PSQ' k p v) |
73 | minView q = fmap (\(k,p,v,q') -> (Binding k v p, q')) $ Q.minView q | 78 | minView q = fmap (\(k,p,v,q') -> (Binding k v p, q')) $ Q.minView q |
74 | {-# INLINE minView #-} | 79 | {-# INLINE minView #-} |