123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682# 2 "stdlib.ml"(**************************************************************************)(* *)(* OCaml *)(* *)(* Xavier Leroy, projet Cristal, INRIA Rocquencourt *)(* *)(* Copyright 1996 Institut National de Recherche en Informatique et *)(* en Automatique. *)(* *)(* All rights reserved. This file is distributed under the terms of *)(* the GNU Lesser General Public License version 2.1, with the *)(* special exception on linking described in the file LICENSE. *)(* *)(**************************************************************************)[@@@ocaml.warning"-49"][@@@ocaml.flambda_o3](* Exceptions *)externalregister_named_value:string->'a->unit="caml_register_named_value"let()=(* for runtime/fail_nat.c *)register_named_value"Pervasives.array_bound_error"(Invalid_argument"index out of bounds");register_named_value"Pervasives.array_align_error"(Invalid_argument"address was misaligned")externalraise:('a:value_or_null).exn->'a@portableunique@@portable="%reraise"externalraise_notrace:('a:value_or_null).exn->'a@portableunique@@portable="%raise_notrace"letfailwiths=raise(Failures)letinvalid_args=raise(Invalid_arguments)exceptionExitexceptionMatch_failure=Match_failureexceptionAssert_failure =Assert_failureexceptionInvalid_argument =Invalid_argumentexceptionFailure=FailureexceptionNot_found=Not_foundexceptionOut_of_memory=Out_of_memoryexceptionStack_overflow =Stack_overflowexceptionSys_error=Sys_errorexceptionEnd_of_file=End_of_fileexceptionDivision_by_zero =Division_by_zeroexceptionSys_blocked_io =Sys_blocked_ioexceptionUndefined_recursive_module =Undefined_recursive_module(* Composition operators *)external(|>):('a:value_or_null)('b:value_or_null).'a->('a->'b)->'b@@portable="%revapply"external(@@):('a:value_or_null)('b:value_or_null).('a->'b)->'a->'b@@portable="%apply"(* Debugging *)external __LOC__:string@@portable="%loc_LOC"external__FILE__:string@@portable="%loc_FILE"external__LINE__:int@@portable="%loc_LINE"external__MODULE__:string@@portable="%loc_MODULE"external__POS__:string*int*int*int@@portable="%loc_POS"external__FUNCTION__:string@@portable="%loc_FUNCTION"external__LOC_OF__:('a:value_or_null).'a->string*'a@@portable="%loc_LOC"external__LINE_OF__:('a:value_or_null).'a->int*'a@@portable="%loc_LINE"external__POS_OF__:('a:value_or_null).'a->(string*int*int*int)*'a@@portable="%loc_POS"(* Comparisons *)external (=):('a:value_or_null).('a[@local_opt])->('a[@local_opt])->bool@@portable="%equal"external(<>):('a:value_or_null).('a[@local_opt])->('a[@local_opt])->bool@@portable="%notequal"external(<):('a:value_or_null).('a[@local_opt])->('a[@local_opt])->bool@@portable="%lessthan"external(>):('a:value_or_null).('a[@local_opt])->('a[@local_opt])->bool@@portable="%greaterthan"external(<=):('a:value_or_null).('a[@local_opt])->('a[@local_opt])->bool@@portable="%lessequal"external(>=):('a:value_or_null).('a[@local_opt])->('a[@local_opt])->bool@@portable="%greaterequal"externalcompare:('a:value_or_null).('a[@local_opt])->('a[@local_opt])->int@@portable="%compare"letminxy=ifx<=ythenxelseyletmaxxy=ifx>=ythenxelseyexternal(==):('a:value_or_null).('a[@local_opt])->('a[@local_opt])->bool@@portable="%eq"external(!=):('a:value_or_null).('a[@local_opt])->('a[@local_opt])->bool@@portable="%noteq"(* Boolean operations *)externalnot:(bool[@local_opt])->bool@@portable="%boolnot"external(&&):(bool[@local_opt])->(bool[@local_opt])->bool@@portable="%sequand"external(||):(bool[@local_opt])->(bool[@local_opt])->bool@@portable="%sequor"(* Integer operations *)external(~-):(int[@local_opt])->int@@portable="%negint"external(~+):(int[@local_opt])->int@@portable="%identity"externalsucc:(int[@local_opt])->int@@portable="%succint"externalpred:(int[@local_opt])->int@@portable="%predint"external(+):(int[@local_opt])->(int[@local_opt])->int@@portable="%addint"external(-):(int[@local_opt])->(int[@local_opt])->int@@portable="%subint"external(*):(int[@local_opt])->(int[@local_opt])->int@@portable="%mulint"external(/):(int[@local_opt])->(int[@local_opt])->int@@portable="%divint"external(mod):(int[@local_opt])->(int[@local_opt])->int@@portable="%modint"letabsx=ifx>=0thenxelse -xexternal(land):(int[@local_opt])->(int[@local_opt])->int@@portable="%andint"external(lor):(int[@local_opt])->(int[@local_opt])->int@@portable="%orint"external(lxor):(int[@local_opt])->(int[@local_opt])->int@@portable="%xorint"letlnotx=xlxor(-1)external(lsl):(int[@local_opt])->(int[@local_opt])->int@@portable="%lslint"external(lsr):(int[@local_opt])->(int[@local_opt])->int@@portable="%lsrint"external(asr):(int[@local_opt])->(int[@local_opt])->int@@portable="%asrint"letmax_int=(-1)lsr 1letmin_int=max_int+1(* Floating-point operations *)external(~-.):(float[@local_opt])->(float[@local_opt])@@portable="%negfloat"external(~+.):(float[@local_opt])->(float[@local_opt])@@portable="%identity"external(+.):(float[@local_opt])->(float[@local_opt])->(float[@local_opt])@@portable="%addfloat"external(-.):(float[@local_opt])->(float[@local_opt])->(float[@local_opt])@@portable="%subfloat"external(*.):(float[@local_opt])->(float[@local_opt])->(float[@local_opt])@@portable="%mulfloat"external(/.):(float[@local_opt])->(float[@local_opt])->(float[@local_opt])@@portable="%divfloat"external(**):float->float->float@@portable ="caml_power_float""pow"[@@unboxed][@@noalloc]externalexp:float->float@@portable="caml_exp_float""exp"[@@unboxed][@@noalloc]externalexpm1:float->float@@portable="caml_expm1_float""caml_expm1"[@@unboxed][@@noalloc]externalacos:float->float@@portable="caml_acos_float""acos"[@@unboxed][@@noalloc]externalasin:float->float@@portable="caml_asin_float""asin"[@@unboxed][@@noalloc]externalatan:float->float@@portable="caml_atan_float""atan"[@@unboxed][@@noalloc]externalatan2:float->float->float@@portable ="caml_atan2_float""atan2"[@@unboxed][@@noalloc]externalhypot:float->float->float@@portable="caml_hypot_float""caml_hypot"[@@unboxed][@@noalloc]externalcos:float->float@@portable="caml_cos_float""cos"[@@unboxed][@@noalloc]externalcosh:float->float@@portable="caml_cosh_float""cosh"[@@unboxed][@@noalloc]externalacosh:float->float@@portable="caml_acosh_float""caml_acosh"[@@unboxed][@@noalloc]externallog:float->float@@portable="caml_log_float""log"[@@unboxed][@@noalloc]externallog10:float->float@@portable="caml_log10_float""log10"[@@unboxed][@@noalloc]externallog1p:float->float@@portable="caml_log1p_float""caml_log1p"[@@unboxed][@@noalloc]externalsin:float->float@@portable="caml_sin_float""sin"[@@unboxed][@@noalloc]externalsinh:float->float@@portable="caml_sinh_float""sinh"[@@unboxed][@@noalloc]externalasinh:float->float@@portable="caml_asinh_float""caml_asinh"[@@unboxed][@@noalloc]externalsqrt:float->float@@portable="caml_sqrt_float""sqrt"[@@unboxed][@@noalloc]externaltan:float->float@@portable="caml_tan_float""tan"[@@unboxed][@@noalloc]externaltanh:float->float@@portable="caml_tanh_float""tanh"[@@unboxed][@@noalloc]externalatanh:float->float@@portable="caml_atanh_float""caml_atanh"[@@unboxed][@@noalloc]externalceil:float->float@@portable="caml_ceil_float""ceil"[@@unboxed][@@noalloc]externalfloor:float->float@@portable="caml_floor_float""floor"[@@unboxed][@@noalloc]externalabs_float:(float[@local_opt])->(float[@local_opt])@@portable="%absfloat"externalcopysign:float->float->float@@portable="caml_copysign_float""caml_copysign"[@@unboxed][@@noalloc]externalmod_float:float->float->float@@portable ="caml_fmod_float""fmod"[@@unboxed][@@noalloc]externalfrexp:float->float*int@@portable ="caml_frexp_float"externalldexp:(float[@unboxed])->(int[@untagged])->(float[@unboxed])@@portable="caml_ldexp_float""caml_ldexp_float_unboxed"[@@noalloc]externalmodf:float->float*float@@portable ="caml_modf_float"externalfloat:(int[@local_opt])->(float[@local_opt])@@portable="%floatofint"externalfloat_of_int:(int[@local_opt])->(float[@local_opt])@@portable="%floatofint"externaltruncate:(float[@local_opt])->int@@portable="%intoffloat"externalint_of_float:(float[@local_opt])->int@@portable="%intoffloat"externalfloat_of_bits:int64->float@@portable="caml_int64_float_of_bits""caml_int64_float_of_bits_unboxed"[@@unboxed][@@noalloc]letinfinity=float_of_bits 0x7F_F0_00_00_00_00_00_00Lletneg_infinity=float_of_bits0xFF_F0_00_00_00_00_00_00Lletnan=float_of_bits0x7F_F8_00_00_00_00_00_01Lletmax_float=float_of_bits0x7F_EF_FF_FF_FF_FF_FF_FFLletmin_float=float_of_bits0x00_10_00_00_00_00_00_00Lletepsilon_float=float_of_bits0x3C_B0_00_00_00_00_00_00Ltypefpclass=FP_normal|FP_subnormal|FP_zero|FP_infinite|FP_nanexternalclassify_float:(float[@unboxed])->fpclass@@portable="caml_classify_float" "caml_classify_float_unboxed"[@@noalloc](* String and byte sequence operations -- more in modules String and Bytes *)externalstring_length:string@local->int@@portable="%string_length"externalbytes_length:bytes@local->int@@portable ="%bytes_length"externalbytes_create:int->bytes@@portable="caml_create_bytes"externalstring_blit:string->int->bytes->int->int->unit@@portable="caml_blit_string"[@@noalloc]externalbytes_blit:bytes->int->bytes->int->int->unit@@portable="caml_blit_bytes"[@@noalloc]externalbytes_unsafe_to_string:bytes->string@@portable="%bytes_to_string"let(^)s1s2=letl1=string_length s1andl2=string_lengths2inlets=bytes_create(l1+l2)instring_blits10s0l1;string_blits20sl1l2;bytes_unsafe_to_strings(* Character operations -- more in module Char *)externalint_of_char:char->int@@portable="%identity"externalunsafe_char_of_int :int->char@@portable="%identity"letchar_of_intn=ifn<0||n>255theninvalid_arg"char_of_int"elseunsafe_char_of_intn(* Unit operations *)externalignore:('a:value_or_null).'a->unit@@portable="%ignore"externalignore_contended :('a:value_or_null).'a@contendedlocalonce->unit@@portable="%ignore"(* Pair operations *)externalfst:('a*'b[@local_opt])->('a[@local_opt])@@portable="%field0_immut"externalsnd:('a*'b[@local_opt])->('b[@local_opt])@@portable="%field1_immut"(* References *)type ('a:value_or_null)ref={mutablecontents:'a}externalref:('a:value_or_null).'a->('aref[@local_opt])@@portable="%makemutable"external(!):('a:value_or_null).('aref[@local_opt])->'a@@portable="%field0"external(:=):('a:value_or_null).('aref[@local_opt])->'a->unit@@portable="%setfield0"externalincr:(intref[@local_opt])->unit @@ portable="%incr"externaldecr:(intref[@local_opt])->unit @@ portable="%decr"(* Result type *)type ('a:value_or_null,'b:value_or_null)result=Okof'a|Errorof'b(* String conversion functions *)externalformat_int:string->int->string@@portable ="caml_format_int"externalformat_float:string->float->string@@portable="caml_format_float"letstring_of_boolb=ifbthen"true"else"false"letbool_of_string=function|"true"->true|"false"->false|_->invalid_arg"bool_of_string"letbool_of_string_opt=function|"true"->Sometrue|"false"->Somefalse|_->Noneletstring_of_intn=format_int"%d"nexternalint_of_string:(string[@local_opt])->int@@portable="caml_int_of_string"letint_of_string_opts=(* TODO: providethis directly as a non-raising primitive. *)trySome(int_of_strings)withFailure_->Noneexternalstring_get:string->int->char@@portable="%string_safe_get"letvalid_float_lexems=letl=string_length sinletrecloopi=ifi>=lthens^"."elsematchstring_getsiwith|'0'..'9'|'-'->loop(i+1)|_->sinloop0letstring_of_floatf=valid_float_lexem(format_float"%.12g"f)externalfloat_of_string:string->float@@portable="caml_float_of_string"letfloat_of_string_opts=(* TODO: providethis directly as a non-raising primitive. *)trySome(float_of_strings)withFailure_->None(* List operations -- more in module List *)let[@tail_mod_cons]rec(@)l1l2=matchl1with|[]->l2|h1::[]->h1::l2|h1::h2::[]->h1::h2 ::l2|h1::h2::h3::tl->h1 ::h2 ::h3 ::(tl@l2)(* I/O operations *)typein_channel:valuemodportablecontendedtypeout_channel:value modportablecontendedexternalopen_descriptor_out :int->out_channel@@portable="caml_ml_open_descriptor_out"externalopen_descriptor_in :int->in_channel@@portable="caml_ml_open_descriptor_in"letstdin=open_descriptor_in 0letstdout=open_descriptor_out1letstderr=open_descriptor_out2(* General output functions *)typeopen_flag=Open_rdonly|Open_wronly|Open_append|Open_creat|Open_trunc|Open_excl|Open_binary|Open_text|Open_nonblockexternalopen_desc:string->open_flaglist->int->int@@portable="caml_sys_open"externalset_out_channel_name:out_channel->string->unit@@portable="caml_ml_set_channel_name"letopen_out_genmodepermname=letc=open_descriptor_out(open_descnamemodeperm)inset_out_channel_namecname;cletopen_outname =open_out_gen[Open_wronly;Open_creat;Open_trunc;Open_text]0o666nameletopen_out_binname=open_out_gen[Open_wronly;Open_creat;Open_trunc;Open_binary]0o666nameexternalflush:out_channel->unit@@portable="caml_ml_flush"externalout_channels_list:unit->out_channellist@@portable="caml_ml_out_channels_list"letflush_all()=letreciter=function[]->()|a::l->begintryflushawithSys_error_->()(* ignore channels closed during a preceding flush. *)end;iterliniter(out_channels_list())externalunsafe_output:out_channel->bytes@local->int ->int->unit@@portable="caml_ml_output_bytes"externalunsafe_output_string :out_channel->string@local->int ->int->unit@@portable="caml_ml_output"externaloutput_char:out_channel->char->unit@@portable ="caml_ml_output_char"letoutput_bytesocs=unsafe_outputocs0(bytes_lengths)letoutput_stringocs=unsafe_output_stringocs0(string_lengths)letoutputocsofslen=ifofs<0||len<0||ofs>bytes_lengths-lentheninvalid_arg"output"elseunsafe_outputocsofslenletoutput_substringocsofslen=ifofs<0||len<0||ofs>string_lengths-lentheninvalid_arg"output_substring"elseunsafe_output_stringocsofslenexternaloutput_byte:out_channel->int->unit@@portable="caml_ml_output_char"externaloutput_binary_int :out_channel->int->unit@@portable="caml_ml_output_int"externalmarshal_to_channel :('a:value_or_null).out_channel->'a->unitlist->unit@@portable="caml_output_value"letoutput_valuechanv=marshal_to_channelchanv[]externalseek_out:out_channel->int->unit@@portable="caml_ml_seek_out"externalpos_out:out_channel->int@@portable="caml_ml_pos_out"externalout_channel_length:out_channel->int@@portable="caml_ml_channel_size"externalclose_out_channel:out_channel->unit@@portable="caml_ml_close_channel"letclose_outoc=flushoc;close_out_channel ocletclose_out_noerroc=(tryflushocwith_->());(tryclose_out_channelocwith_->())externalset_binary_mode_out:out_channel->bool->unit@@portable="caml_ml_set_binary_mode"(* General input functions *)externalset_in_channel_name:in_channel->string->unit@@portable ="caml_ml_set_channel_name"letopen_in_genmodepermname=letc=open_descriptor_in(open_descnamemodeperm)inset_in_channel_namecname;cletopen_inname=open_in_gen[Open_rdonly;Open_text]0nameletopen_in_binname=open_in_gen[Open_rdonly;Open_binary]0nameexternalinput_char:in_channel->char@@portable="caml_ml_input_char"externalunsafe_input:in_channel->bytes->int->int->int@@ portable="caml_ml_input"letinputicsofslen =ifofs<0||len<0||ofs>bytes_lengths-lentheninvalid_arg"input"elseunsafe_inputicsofslenletrecunsafe_really_inputicsofslen=iflen<=0then ()elsebeginletr=unsafe_inputicsofsleninifr=0then raiseEnd_of_fileelseunsafe_really_inputics(ofs+r)(len-r)endletreally_inputicsofslen=ifofs<0||len<0||ofs>bytes_lengths-lentheninvalid_arg"really_input"elseunsafe_really_inputicsofslenletreally_input_stringiclen=lets=bytes_create leninreally_inputics0len;bytes_unsafe_to_stringsexternalinput_scan_line:in_channel->int@@portable="caml_ml_input_scan_line"letinput_linechan=letrecbuild_result bufpos=function[]->buf|hd::tl->letlen=bytes_lengthhdinbytes_blithd0buf(pos-len)len;build_resultbuf (pos-len)tlinlet recscanacculen=letn=input_scan_linechaninifn=0thenbegin(* n = 0: we are at EOF *)matchaccuwith[]->raise End_of_file|_->build_result(bytes_createlen)lenaccuendelseifn>0thenbegin(* n > 0: newline found in buffer *)letres=bytes_create(n-1)inignore(unsafe_inputchanres0(n-1));ignore(input_charchan);(* skip the newline *)matchaccuwith[]->res|_->letlen=len+n-1inbuild_result(bytes_createlen)len(res::accu)endelsebegin(* n < 0: newline not found *)letbeg=bytes_create(-n)inignore(unsafe_inputchanbeg0(-n));scan(beg ::accu)(len-n)endin bytes_unsafe_to_string(scan[]0)externalinput_byte:in_channel->int@@portable="caml_ml_input_char"externalinput_binary_int:in_channel->int@@portable="caml_ml_input_int"externalinput_value:('a:value_or_null).in_channel->'a@@portable="caml_input_value"externalseek_in:in_channel ->int->unit@@portable="caml_ml_seek_in"externalpos_in:in_channel ->int@@portable="caml_ml_pos_in"externalin_channel_length :in_channel->int@@portable="caml_ml_channel_size"externalclose_in:in_channel ->unit@@portable="caml_ml_close_channel"letclose_in_noerric=(tryclose_inicwith_->())externalset_binary_mode_in:in_channel->bool->unit@@portable="caml_ml_set_binary_mode"(* Output functions on standard output *)letprint_charc=output_charstdoutcletprint_strings=output_stringstdoutsletprint_bytess=output_bytesstdoutsletprint_inti=output_stringstdout(string_of_inti)letprint_floatf=output_stringstdout(string_of_floatf)letprint_endlines=output_stringstdouts;output_charstdout'\n';flushstdoutletprint_newline()=output_charstdout'\n';flushstdout(* Output functions on standard error *)letprerr_charc=output_charstderrcletprerr_strings=output_stringstderrsletprerr_bytess=output_bytesstderrsletprerr_inti=output_stringstderr(string_of_inti)letprerr_floatf=output_stringstderr(string_of_floatf)letprerr_endlines=output_stringstderrs;output_charstderr'\n';flushstderrletprerr_newline()=output_charstderr'\n';flushstderr(* Input functions on standard input *)letread_line()=flushstdout;input_linestdinletread_int()=int_of_string(read_line())letread_int_opt()=int_of_string_opt(read_line())letread_float()=float_of_string(read_line())letread_float_opt()=float_of_string_opt(read_line())(* Operations on large files *)moduleLargeFile=structexternalseek_out:out_channel->int64->unit@@portable ="caml_ml_seek_out_64"externalpos_out:out_channel->int64@@portable="caml_ml_pos_out_64"externalout_channel_length:out_channel->int64@@portable="caml_ml_channel_size_64"externalseek_in:in_channel->int64->unit@@portable ="caml_ml_seek_in_64"externalpos_in:in_channel->int64@@portable="caml_ml_pos_in_64"externalin_channel_length:in_channel->int64@@portable="caml_ml_channel_size_64"end(* Formats *)type('a,'b,'c,'d,'e,'f)format6=('a,'b,'c,'d,'e,'f)CamlinternalFormatBasics.format6=Formatof('a,'b,'c,'d,'e,'f)CamlinternalFormatBasics.fmt*stringtype('a,'b,'c,'d)format4=('a,'b,'c,'c,'c,'d)format6type('a,'b,'c)format =('a,'b,'c,'c)format4letstring_of_format(Format(_fmt,str))=strexternalformat_of_string:('a,'b,'c,'d,'e,'f)format6->('a,'b,'c,'d,'e,'f)format6@@portable="%identity"let(^^)(Format(fmt1,str1))(Format(fmt2,str2))=Format(CamlinternalFormatBasics.concat_fmtfmt1fmt2,str1 ^"%,"^str2)(* Miscellaneous *)externalsys_exit:int->'a="caml_sys_exit"(* for at_exit *)type 'aatomic_t:valuemodportablecontendedexternalatomic_make:'a@contendedportable->'aatomic_t@@portable="%makemutable"externalatomic_get:'aatomic_t->'a@contendedportable@@portable="%atomic_load"externalatomic_compare_and_set :'aatomic_t->'a@contendedportable->'a@contendedportable->bool@@portable="%atomic_cas"externalmagic_portable:'a->'a@portable="%identity"(* [exit_function] is only executed from [do_at_exit] below, which is [nonportable],
so it is safe to call [nonportable] functions from it as long as [exit] remains
nonportable. *)letexit_function=atomic_makeflush_allletrecat_exit_safe(f@portable)=(* MPR#7253, MPR#7796: make sure "f" is executed only once *)letf_yet_to_run=atomic_maketrueinletold_exit=atomic_getexit_functioninletnew_exit()=ifatomic_compare_and_setf_yet_to_runtruefalsethenf();old_exit()inletsuccess=atomic_compare_and_setexit_functionold_exitnew_exitinifnotsuccess then at_exit_safeflet(at_exit@nonportable)f=at_exit_safe (magic_portablef)letdo_domain_local_at_exit=ref(fun()->())let(do_at_exit@nonportable)()=(!do_domain_local_at_exit)();(atomic_getexit_function)()letexitretcode=do_at_exit();sys_exit retcodelet_=register_named_value"Pervasives.do_at_exit"do_at_exitexternalmajor:unit->unit@@portable="caml_gc_major"externalnaked_pointers_checked:unit->bool@@portable="caml_sys_const_naked_pointers_checked"let()=ifnaked_pointers_checked()thenat_exitmajormoduleSafe=structletat_exit=at_exit_safeend(*MODULE_ALIASES*)module Arg=ArgmoduleArray=ArraymoduleArrayLabels=ArrayLabelsmoduleAtomic=AtomicmoduleBackoff=BackoffmoduleBigarray=BigarraymoduleBool =BoolmoduleBuffer=BuffermoduleBytes=BytesmoduleBytesLabels=BytesLabelsmoduleCallback=CallbackmoduleChar=CharmoduleComplex=ComplexmoduleCondition=ConditionmoduleDigest=DigestmoduleDomain=DomainmoduleDynarray=DynarraymoduleEffect=EffectmoduleEither =EithermoduleEphemeron=EphemeronmoduleFilename=FilenamemoduleFloat=FloatmoduleFormat=Formatmodule Fun=FunmoduleGc=Gcmodule Hashtbl=HashtblmoduleIn_channel=In_channelmoduleInt=IntmoduleInt32=Int32moduleInt64=Int64moduleLazy=LazymoduleLexing=LexingmoduleList=ListmoduleListLabels=ListLabelsmoduleMap=MapmoduleMarshal=Marshalmodule Modes=ModesmoduleMoreLabels=MoreLabelsmodule Mutex=MutexmoduleNativeint=Nativeintmodule Obj=ObjmoduleOo=OomoduleOption=OptionmoduleOut_channel=Out_channelmoduleParsing=ParsingmodulePrintexc=PrintexcmodulePrintf=PrintfmoduleQueue=QueuemoduleQuote=QuotemoduleRandom=RandommoduleResult=ResultmoduleScanf=ScanfmoduleSemaphore =SemaphoremoduleSeq=SeqmoduleSet=SetmoduleStack=StackmoduleStdLabels=StdLabelsmoduleString=StringmoduleStringLabels=StringLabelsmoduleSys=SysmoduleType=TypemoduleUchar=UcharmoduleUnit=UnitmoduleWeak=Weak