Source codeContentsIndex
VariableMap
Synopsis
data VariableMapData key elt
newtype VariableMapUpdate key elt = VariableMapUpdate (VariableSetUpdate (key, elt))
data VariableMap key elt
newEmptyVariableMap :: (Ord key) => IO (VariableMap key elt)
newVariableMap :: (Ord key) => [(key, elt)] -> IO (VariableMap key elt)
updateMap :: (Ord key) => VariableMap key elt -> VariableMapUpdate key elt -> IO ()
lookupMap :: (Ord key) => VariableMapData key elt -> key -> Maybe elt
lookupWithDefaultMap :: (Ord key) => VariableMapData key elt -> elt -> key -> elt
mapToList :: (Ord key) => VariableMapData key elt -> [(key, elt)]
mapToSinkSource :: (Ord key) => (key -> elt -> element) -> VariableMap key elt -> VariableSetSource element
Documentation
data VariableMapData key elt
newtype VariableMapUpdate key elt
We recycle the VariableSetUpdate type for this.
Constructors
VariableMapUpdate (VariableSetUpdate (key, elt))
Instances
(Ord key) => CanAddSinks (VariableMap key elt) (VariableMapData key elt) (VariableMapUpdate key elt)
data VariableMap key elt
newEmptyVariableMap :: (Ord key) => IO (VariableMap key elt)
Create a new empty variable map.
newVariableMap :: (Ord key) => [(key, elt)] -> IO (VariableMap key elt)
Create a new variable map with given contents
updateMap :: (Ord key) => VariableMap key elt -> VariableMapUpdate key elt -> IO ()
Update a variable map in some way.
lookupMap :: (Ord key) => VariableMapData key elt -> key -> Maybe elt
lookupWithDefaultMap :: (Ord key) => VariableMapData key elt -> elt -> key -> elt
mapToList :: (Ord key) => VariableMapData key elt -> [(key, elt)]
mapToSinkSource :: (Ord key) => (key -> elt -> element) -> VariableMap key elt -> VariableSetSource element
Given a variable map and conversion function, produce a VariableSetSource
Produced by Haddock version 0.3