what4-1.6.3: Solver-agnostic symbolic values support for issuing queries

Copyright | (c) Galois Inc 2019-2020
License | BSD3
Maintainer | huffman@galois.com
Safe Haskell | Safe-Inferred
Language | Haskell2010

What4.Utils.AnnotatedMap

Description

A finite map data structure with monoidal annotations.

# Documentation

data AnnotatedMap k v a Source #

#### Instances

Instances details

(Ord k, Semigroup v) => Functor (AnnotatedMap k v) Source # |
Instance details Defined in What4.Utils.AnnotatedMap Methods fmap :: (a -> b) -> AnnotatedMap k v a -> AnnotatedMap k v b Source # (<$) :: a -> AnnotatedMap k v b -> AnnotatedMap k v a Source #
(Ord k, Semigroup v) => Foldable (AnnotatedMap k v) Source # |

Instance details

Defined in What4.Utils.AnnotatedMap

Methods

fold :: Monoid m => AnnotatedMap k v m -> m Source #

foldMap :: Monoid m => (a -> m) -> AnnotatedMap k v a -> m Source #

foldMap' :: Monoid m => (a -> m) -> AnnotatedMap k v a -> m Source #

foldr :: (a -> b -> b) -> b -> AnnotatedMap k v a -> b Source #

foldr' :: (a -> b -> b) -> b -> AnnotatedMap k v a -> b Source #

foldl :: (b -> a -> b) -> b -> AnnotatedMap k v a -> b Source #

foldl' :: (b -> a -> b) -> b -> AnnotatedMap k v a -> b Source #

foldr1 :: (a -> a -> a) -> AnnotatedMap k v a -> a Source #

foldl1 :: (a -> a -> a) -> AnnotatedMap k v a -> a Source #

toList :: AnnotatedMap k v a -> [a] Source #

null :: AnnotatedMap k v a -> Bool Source #

length :: AnnotatedMap k v a -> Int Source #

elem :: Eq a => a -> AnnotatedMap k v a -> Bool Source #

maximum :: Ord a => AnnotatedMap k v a -> a Source #

minimum :: Ord a => AnnotatedMap k v a -> a Source #

sum :: Num a => AnnotatedMap k v a -> a Source #

product :: Num a => AnnotatedMap k v a -> a Source #

(Ord k, Semigroup v) => Traversable (AnnotatedMap k v) Source # |

Instance details

Defined in What4.Utils.AnnotatedMap

Methods

traverse :: Applicative f => (a -> f b) -> AnnotatedMap k v a -> f (AnnotatedMap k v b) Source #

sequenceA :: Applicative f => AnnotatedMap k v (f a) -> f (AnnotatedMap k v a) Source #

mapM :: Monad m => (a -> m b) -> AnnotatedMap k v a -> m (AnnotatedMap k v b) Source #

sequence :: Monad m => AnnotatedMap k v (m a) -> m (AnnotatedMap k v a) Source #

null :: AnnotatedMap k v a -> Bool Source #

empty :: (Ord k, Semigroup v) => AnnotatedMap k v a Source #

singleton :: (Ord k, Semigroup v) => k -> v -> a -> AnnotatedMap k v a Source #

size :: (Ord k, Semigroup v) => AnnotatedMap k v a -> Int Source #

lookup :: (Ord k, Semigroup v) => k -> AnnotatedMap k v a -> Maybe (v, a) Source #

delete :: (Ord k, Semigroup v) => k -> AnnotatedMap k v a -> AnnotatedMap k v a Source #

annotation :: (Ord k, Semigroup v) => AnnotatedMap k v a -> Maybe v Source #

toList :: AnnotatedMap k v a -> [(k, a)] Source #

fromAscList :: (Ord k, Semigroup v) => [(k, v, a)] -> AnnotatedMap k v a Source #

insert :: (Ord k, Semigroup v) => k -> v -> a -> AnnotatedMap k v a -> AnnotatedMap k v a Source #

alter :: (Ord k, Semigroup v) => (Maybe (v, a) -> Maybe (v, a)) -> k -> AnnotatedMap k v a -> AnnotatedMap k v a Source #

alterF :: (Functor f, Ord k, Semigroup v) => (Maybe (v, a) -> f (Maybe (v, a))) -> k -> AnnotatedMap k v a -> f (AnnotatedMap k v a) Source #

union :: (Ord k, Semigroup v) => AnnotatedMap k v a -> AnnotatedMap k v a -> AnnotatedMap k v a Source #

unionWith :: (Ord k, Semigroup v) => ((v, a) -> (v, a) -> (v, a)) -> AnnotatedMap k v a -> AnnotatedMap k v a -> AnnotatedMap k v a Source #

unionWithKeyMaybe :: (Ord k, Semigroup v) => (k -> a -> a -> Maybe (v, a)) -> AnnotatedMap k v a -> AnnotatedMap k v a -> AnnotatedMap k v a Source #

filter :: (Ord k, Semigroup v) => (a -> Bool) -> AnnotatedMap k v a -> AnnotatedMap k v a Source #

mapMaybe :: (Ord k, Semigroup v) => (a -> Maybe b) -> AnnotatedMap k v a -> AnnotatedMap k v b Source #

mapMaybeWithKey :: (Ord k, Semigroup v2) => (k -> v1 -> a1 -> Maybe (v2, a2)) -> AnnotatedMap k v1 a1 -> AnnotatedMap k v2 a2 Source #

traverseMaybeWithKey :: (Applicative f, Ord k, Semigroup v2) => (k -> v1 -> a1 -> f (Maybe (v2, a2))) -> AnnotatedMap k v1 a1 -> f (AnnotatedMap k v2 a2) Source #

difference :: (Ord k, Semigroup v, Semigroup w) => AnnotatedMap k v a -> AnnotatedMap k w b -> AnnotatedMap k v a Source #

mergeWithKey Source #

Arguments

:: (Ord k, Semigroup u, Semigroup v, Semigroup w) |
=> (k -> (u, a) -> (v, b) -> Maybe (w, c)) | for keys present in both maps
-> (AnnotatedMap k u a -> AnnotatedMap k w c) | for subtrees only in first map
-> (AnnotatedMap k v b -> AnnotatedMap k w c) | for subtrees only in second map
-> AnnotatedMap k u a |
-> AnnotatedMap k v b |
-> AnnotatedMap k w c |

mergeWithKeyM :: (Ord k, Semigroup u, Semigroup v, Semigroup w, Applicative m) => (k -> (u, a) -> (v, b) -> m (w, c)) -> (k -> (u, a) -> m (w, c)) -> (k -> (v, b) -> m (w, c)) -> AnnotatedMap k u a -> AnnotatedMap k v b -> m (AnnotatedMap k w c) Source #

mergeA :: (Ord k, Semigroup v, Applicative f) => (k -> (v, a) -> (v, a) -> f (v, a)) -> AnnotatedMap k v a -> AnnotatedMap k v a -> f (AnnotatedMap k v a) Source #

eqBy :: Eq k => (a -> a -> Bool) -> AnnotatedMap k v a -> AnnotatedMap k v a -> Bool Source #