Common.EnvThis module provides a simple environment data structure for storing bindings between keys and values. The environment supports adding and removing scopes, binding values to keys, and finding values bound to keys.
Duplicate_binding id is raised when a binding for id already exists
val empty_env : 'a envempty_env returns an empty environment with no bindings
bind x v env binds the value v to the key x in the environment env
bind_at_depth x v n env binds the value v to the key x in the nth scope of the environment env
val find_flat : string -> 'a env -> 'a optionfind_flat x env returns the value bound to the key x in the environment env
val get : string -> 'a env -> 'aget x env returns the value bound to the key x in the environment env
val flatten : 'a env -> (string * 'a) listflatten env returns a list of all the bindings in the environment env
val string_of_env : ('a -> string) -> 'a env -> stringstring_of_env v_fmt env returns a string representation of the environment env