dune/src/env.mli

34 lines
582 B
OCaml
Raw Normal View History

open Import
module Var : sig
type t = string
2018-03-10 14:15:02 +00:00
val compare : t -> t -> Ordering.t
end
2018-03-10 14:15:02 +00:00
type t
module Map : Map.S with type key = Var.t
val empty : t
(** The environment when the process started *)
val initial : t
2018-03-10 14:15:02 +00:00
val to_unix : t -> string array
2018-03-11 04:17:09 +00:00
val get : t -> Var.t -> string option
2018-03-10 14:15:02 +00:00
val extend : t -> vars:string Map.t -> t
2018-03-11 04:45:47 +00:00
val extend_env : t -> t -> t
2018-03-11 04:45:47 +00:00
val add : t -> var:Var.t -> value:string -> t
2018-03-12 03:43:43 +00:00
val diff : t -> t -> t
2018-03-22 14:42:42 +00:00
val update : t -> var:string -> f:(string option -> string option) -> t
2018-03-12 03:43:43 +00:00
val sexp_of_t : t -> Sexp.t
2018-03-22 14:42:42 +00:00
val of_string_map : string String.Map.t -> t