Runtime environment
If we were to compile a script to an OCaml program, all functions would have to take this environment as argument.
module Working_dir_spec : sig ... endval create : ?stdin:Shexp_process__.Import.Unix.file_descr ‑> ?stdout:Shexp_process__.Import.Unix.file_descr ‑> ?stderr:Shexp_process__.Import.Unix.file_descr ‑> ?cwd:Working_dir_spec.t ‑> ?unix_env:(string * string) list ‑> unit ‑> tval cwd_logical : t ‑> stringval stdin : t ‑> Shexp_process__.Import.Unix.file_descrval stdout : t ‑> Shexp_process__.Import.Unix.file_descrval stderr : t ‑> Shexp_process__.Import.Unix.file_descrval set_stdin : t ‑> Shexp_process__.Import.Unix.file_descr ‑> tval set_stdout : t ‑> Shexp_process__.Import.Unix.file_descr ‑> tval set_stderr : t ‑> Shexp_process__.Import.Unix.file_descr ‑> tval set_outputs : t ‑> Shexp_process__.Import.Unix.file_descr ‑> tval set_stdios : t ‑> stdin:Shexp_process__.Import.Unix.file_descr ‑> stdout:Shexp_process__.Import.Unix.file_descr ‑> stderr:Shexp_process__.Import.Unix.file_descr ‑> tval get_stdio : t ‑> Shexp_process.Std_io.t ‑> Shexp_process__.Import.Unix.file_descrval set_stdio : t ‑> Shexp_process.Std_io.t ‑> Shexp_process__.Import.Unix.file_descr ‑> tval open_file : t ‑> ?perm:Shexp_process__.Import.Posixat.File_perm.t ‑> flags:Shexp_process__.Import.Posixat.Open_flag.t list ‑> string ‑> Shexp_process__.Import.Unix.file_descrval with_file : t ‑> ?perm:Shexp_process__.Import.Posixat.File_perm.t ‑> flags:Shexp_process__.Import.Posixat.Open_flag.t list ‑> string ‑> f:(Shexp_process__.Import.Unix.file_descr ‑> 'a) ‑> 'aval chmod : t ‑> string ‑> perm:int ‑> unitval chown : t ‑> string ‑> uid:int ‑> gid:int ‑> unitval mkdir : t ‑> ?perm:int ‑> ?p:bool ‑> string ‑> unitval rm : t ‑> string ‑> unitval rmdir : t ‑> string ‑> unitval mkfifo : t ‑> ?perm:int ‑> string ‑> unitval link : t ‑> string ‑> string ‑> unitval rename : t ‑> string ‑> string ‑> unitval symlink : t ‑> string ‑> string ‑> unitval stat : t ‑> string ‑> Shexp_process__.Import.Unix.statsval lstat : t ‑> string ‑> Shexp_process__.Import.Unix.statsval readlink : t ‑> string ‑> stringval readdir : t ‑> string ‑> string listval access : t ‑> string ‑> Shexp_process__.Import.Unix.access_permission list ‑> unit