Copyright | (c) Galois Inc 2015-2020 |
---|---|
License | BSD3 |
Maintainer | Joe Hendrix <jhendrix@galois.com> |
Safe Haskell | Safe-Inferred |
Language | Haskell2010 |
This module defines a strict map.
It is similiar to Data.Map.Strict, but provides some additional operations including splitEntry, splitLeq, fromDistinctDescList.
Synopsis
- data LeqMap k p
- toList :: LeqMap k p -> [(k, p)]
- findMin :: LeqMap k p -> (k, p)
- findMax :: LeqMap k p -> (k, p)
- null :: LeqMap k p -> Bool
- empty :: LeqMap k p
- mapKeysMonotonic :: (k1 -> k2) -> LeqMap k1 p -> LeqMap k2 p
- union :: Ord k => LeqMap k p -> LeqMap k p -> LeqMap k p
- fromDistinctAscList :: [(k, p)] -> LeqMap k p
- fromDistinctDescList :: [(k, p)] -> LeqMap k p
- toDescList :: LeqMap k p -> [(k, p)]
- deleteFindMin :: LeqMap k p -> ((k, p), LeqMap k p)
- deleteFindMax :: LeqMap k p -> ((k, p), LeqMap k p)
- minViewWithKey :: LeqMap k p -> Maybe ((k, p), LeqMap k p)
- filterGt :: Ord k => k -> LeqMap k p -> LeqMap k p
- filterLt :: Ord k => k -> LeqMap k p -> LeqMap k p
- insert :: Ord k => k -> p -> LeqMap k p -> LeqMap k p
- lookupLE :: Ord k => k -> LeqMap k p -> Maybe (k, p)
- lookupLT :: Ord k => k -> LeqMap k p -> Maybe (k, p)
- lookupGE :: Ord k => k -> LeqMap k p -> Maybe (k, p)
- lookupGT :: Ord k => k -> LeqMap k p -> Maybe (k, p)
- keys :: LeqMap k p -> [k]
- mergeWithKey :: forall a b c. (a -> b -> IO c) -> (a -> IO c) -> (b -> IO c) -> LeqMap Integer a -> LeqMap Integer b -> IO (LeqMap Integer c)
- singleton :: k -> p -> LeqMap k p
- foldlWithKey' :: (a -> k -> b -> a) -> a -> LeqMap k b -> a
- size :: LeqMap k p -> Int
- splitEntry :: LeqMap k p -> Maybe (LeqMap k p, (k, p), LeqMap k p)
- splitLeq :: Ord k => k -> LeqMap k p -> (LeqMap k p, LeqMap k p)
Documentation
Instances
Foldable (LeqMap k) Source # | |
Defined in What4.Utils.LeqMap fold :: Monoid m => LeqMap k m -> m # foldMap :: Monoid m => (a -> m) -> LeqMap k a -> m # foldMap' :: Monoid m => (a -> m) -> LeqMap k a -> m # foldr :: (a -> b -> b) -> b -> LeqMap k a -> b # foldr' :: (a -> b -> b) -> b -> LeqMap k a -> b # foldl :: (b -> a -> b) -> b -> LeqMap k a -> b # foldl' :: (b -> a -> b) -> b -> LeqMap k a -> b # foldr1 :: (a -> a -> a) -> LeqMap k a -> a # foldl1 :: (a -> a -> a) -> LeqMap k a -> a # elem :: Eq a => a -> LeqMap k a -> Bool # maximum :: Ord a => LeqMap k a -> a # minimum :: Ord a => LeqMap k a -> a # | |
Traversable (LeqMap k) Source # | |
Functor (LeqMap k) Source # | |
(Ord k, Eq p) => Eq (LeqMap k p) Source # | |
mapKeysMonotonic :: (k1 -> k2) -> LeqMap k1 p -> LeqMap k2 p Source #
fromDistinctAscList :: [(k, p)] -> LeqMap k p Source #
fromDistinctDescList :: [(k, p)] -> LeqMap k p Source #
Create a map from a list of keys in descending order.
toDescList :: LeqMap k p -> [(k, p)] Source #
deleteFindMin :: LeqMap k p -> ((k, p), LeqMap k p) Source #
deleteFindMax :: LeqMap k p -> ((k, p), LeqMap k p) Source #
lookupLE :: Ord k => k -> LeqMap k p -> Maybe (k, p) Source #
Find largest element that is less than or equal to key (if any).
lookupLT :: Ord k => k -> LeqMap k p -> Maybe (k, p) Source #
Find less than element that is less than key (if any).
lookupGE :: Ord k => k -> LeqMap k p -> Maybe (k, p) Source #
Find largest element that is at least key (if any).
lookupGT :: Ord k => k -> LeqMap k p -> Maybe (k, p) Source #
Find less than element that is less than key (if any).
mergeWithKey :: forall a b c. (a -> b -> IO c) -> (a -> IO c) -> (b -> IO c) -> LeqMap Integer a -> LeqMap Integer b -> IO (LeqMap Integer c) Source #
foldlWithKey' :: (a -> k -> b -> a) -> a -> LeqMap k b -> a Source #