Module Smyth.Env

val empty : Lang.env

The empty evaluation environment.

val all_res : Lang.env -> (string * Lang.res) list

all_res env returns all name-to-Lang.res bindings in the environment env; that is, the assignment of expression variables to results.

val all_type : Lang.env -> (string * Lang.typ) list

all_type env returns all name-to-Lang.typ bindings in the environment env; that is, the assignment of type variables to types.

val concat : Lang.env list -> Lang.env

Concatenates a list of environments.

val add_res : (string * Lang.res) -> Lang.env -> Lang.env

Adds a name-to-Lang.res binding to the beginning of an environment.

val concat_res : (string * Lang.res) list -> Lang.env -> Lang.env

Concatenates a list of name-to-Lang.res bindings to the beginning of an environment.

val add_type : (string * Lang.typ) -> Lang.env -> Lang.env

Adds a name-to-Lang.typ binding to the beginning of an environment.

val concat_type : (string * Lang.typ) list -> Lang.env -> Lang.env

Concatenates a list of name-to-Lang.typ bindings to the beginning of an environment.