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

Copyright(c) Galois Inc 2019-2020
LicenseBSD3
Maintainerhuffman@galois.com
Safe HaskellSafe
LanguageHaskell2010

What4.Utils.AnnotatedMap

Description

A finite map data structure with monoidal annotations.

Documentation

data AnnotatedMap k v a Source #

Instances
(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 #

(<$) :: a -> AnnotatedMap k v b -> AnnotatedMap k v a #

(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 #

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

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

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

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

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

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

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

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

null :: AnnotatedMap k v a -> Bool #

length :: AnnotatedMap k v a -> Int #

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

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

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

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

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

(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) #

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

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

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

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 #

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 #

traverseMaybeWithKey :: (Applicative f, Ord k, Semigroup v1, Semigroup v2) => (k -> v1 -> a1 -> f (Maybe (v2, a2))) -> AnnotatedMap k v1 a1 -> f (AnnotatedMap k v2 a2) 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 #