parent
2e636ef43e
commit
cc02277095
13
src/env.ml
13
src/env.ml
|
@ -44,15 +44,10 @@ let of_unix arr =
|
||||||
Sexp.code_error "Env.of_unix: entry without '=' found in the environ"
|
Sexp.code_error "Env.of_unix: entry without '=' found in the environ"
|
||||||
["var", Sexp.To_sexp.string s]
|
["var", Sexp.To_sexp.string s]
|
||||||
| Some (k, v) -> (k, v))
|
| Some (k, v) -> (k, v))
|
||||||
|> Map.of_list
|
|> Map.of_list_multi
|
||||||
|> function
|
|> Map.map ~f:(function
|
||||||
| Ok x -> x
|
| [] -> assert false
|
||||||
| Error (var, v1, v2) ->
|
| x::_ -> x)
|
||||||
Sexp.code_error "Env.of_unix: duplicated variable found in the environment"
|
|
||||||
[ "var" , Sexp.To_sexp.string var
|
|
||||||
; "value1", Sexp.To_sexp.string v1
|
|
||||||
; "value2", Sexp.To_sexp.string v2
|
|
||||||
]
|
|
||||||
|
|
||||||
let initial =
|
let initial =
|
||||||
let i =
|
let i =
|
||||||
|
|
Loading…
Reference in New Issue