1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950(* [Sys0] defines functions that are primitives or can be simply defined in
terms of [Caml.Sys]. [Sys0] is intended to completely express the part of
[Caml.Sys] that [Base] uses -- no other file in Base other than sys.ml
should use [Caml.Sys]. [Sys0] has few dependencies, and so is available
early in Base's build order. All Base files that need to use these
functions and come before [Base.Sys] in build order should do
[module Sys = Sys0]. Defining [module Sys = Sys0] is also necessary because
it prevents ocamldep from mistakenly causing a file to depend on [Base.Sys]. *)open!Import0typebackend_type=Caml.Sys.backend_type=|Native|Bytecode|Otherofstringletbackend_type=Caml.Sys.backend_typeletinteractive=Caml.Sys.interactiveletos_type=Caml.Sys.os_typeletunix=Caml.Sys.unixletwin32=Caml.Sys.win32letcygwin=Caml.Sys.cygwinletword_size_in_bits=Caml.Sys.word_sizeletint_size_in_bits=Caml.Sys.int_sizeletbig_endian=Caml.Sys.big_endianletmax_string_length=Caml.Sys.max_string_lengthletmax_array_length=Caml.Sys.max_array_lengthletruntime_variant=Caml.Sys.runtime_variantletruntime_parameters=Caml.Sys.runtime_parametersletargv=Caml.Sys.argvletget_argv()=Caml.Sys.argvletocaml_version=Caml.Sys.ocaml_versionletenable_runtime_warnings=Caml.Sys.enable_runtime_warningsletruntime_warnings_enabled=Caml.Sys.runtime_warnings_enabledletgetenv_exnvar=tryCaml.Sys.getenvvarwith|Caml.Not_found->Printf.failwithf"Sys.getenv_exn: environment variable %s is not set"var();;letgetenvvar=matchCaml.Sys.getenvvarwith|x->Somex|exceptionCaml.Not_found->None;;externalopaque_identity:'a->'a="%opaque"exceptionBreak=Caml.Sys.Break