Add Env.add

Just add 1 binding to Env
This commit is contained in:
Rudi Grinberg 2018-03-11 11:45:47 +07:00
parent 3193e4902d
commit f1baaa23a8
2 changed files with 5 additions and 0 deletions

View File

@ -80,3 +80,6 @@ let extend t ~vars =
| Some _ -> v2
| None -> v1)
)
let add t ~var ~value =
make ~base:t.base ~extra:(Map.add t.extra var value)

View File

@ -16,3 +16,5 @@ val to_unix : t -> string array
val get : t -> Var.t -> string option
val extend : t -> vars:string Map.t -> t
val add : t -> var:Var.t -> value:string -> t