module StringModules: sig
.. end
A place for StringSet and StringMap to live.
module StringSet: Set.Make
(
String
)
module StringMap: Map.Make
(
String
)
A place for StringSet and StringMap to live.
type 'a
lookup_table = 'a StringMap.t StringMap.t
Convenience type to make reading table types easier. A lookup_table
is a primary key -> second key -> value map (i.e. the values of the
first StringMap are themselves StringMap maps...
type 'a
lookup_map = 'a StringMap.t
Convenience type to make reading string maps easier. A lookup_map
is just a StringMap map.
val print_lookup_map : 'a StringMap.t ->
(StringMap.key -> 'a -> string) -> unit
Print the contents of a lookup_map
Parameters: |
map |
: |
'a StringMap.t
|
stringer |
: |
StringMap.key -> 'a -> string
|
|
val print_lookup_table : 'a StringMap.t StringMap.t ->
(StringMap.key -> StringMap.key -> 'a -> string) ->
unit
Print the contents of a lookup_table
Parameters: |
table |
: |
'a StringMap.t StringMap.t
|
stringer |
: |
StringMap.key -> StringMap.key -> 'a -> string
|
|
val build_map_track_errors : ('a StringMap.t * 'b list ->
'c -> 'a StringMap.t * 'b list) ->
'c list -> ('a StringMap.t, 'b list) Util.either
To put it into symbols, we have builder : (StringMap, errorList) -> item -> (StringMap', errorList')
Parameters: |
builder |
: |
'a StringMap.t * 'b list -> 'c -> 'a StringMap.t * 'b list
A function that accepts a StringMap/(error list) pair and a new item
and returns a new pair with either and updated map or updated error list
|
alist |
: |
'c list
The list of data to build the map out of.
|
|
val map_lookup : StringMap.key -> 'a StringMap.t -> 'a option
Look a value up in a map
Returns Some(value) or None
Parameters: |
key |
: |
StringMap.key
The key to look up
|
map |
: |
'a StringMap.t
The map to search in
|
|
val map_lookup_list : StringMap.key -> 'a list StringMap.t -> 'a list
Look a list up in a map
Returns a list or None
Parameters: |
key |
: |
StringMap.key
The key to look up
|
map |
: |
'a list StringMap.t
The map to search in
|
|
val add_map_list : StringMap.key ->
'a -> 'a list StringMap.t -> 'a list StringMap.t
Updating a string map that has list of possible values
Parameters: |
key |
: |
StringMap.key
|
value |
: |
'a
|
map |
: |
'a list StringMap.t
|
|
val concat_map_list : StringMap.key ->
'a list ->
'a list StringMap.t -> 'a list StringMap.t
Updating a string map that has a list of possible values with a bunch of new values
Parameters: |
key |
: |
StringMap.key
|
values |
: |
'a list
|
map |
: |
'a list StringMap.t
|
|
val add_map_unique : StringMap.key ->
'a ->
'a StringMap.t * StringMap.key list ->
'a StringMap.t * StringMap.key list
Update a map but keep track of collisions
Parameters: |
key |
: |
StringMap.key
|
value |
: |
'a
|
(map,collisions) |
: |
'a StringMap.t * StringMap.key list
|
|