123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507openBasement.Or_null_shim.Exporttype('a:value_or_null)global:value_or_null={global:'a@@aliasedglobal}[@@unboxed]moduleAccess:sigtype'kt:voidmodaliasedexternal_globalmanyportabletypepacked=P:'kt->packed[@@unboxed]type'kboxed:valuemodaliasedexternal_globalmanyportablevalbox:'kt->'kboxedvalunbox:'kboxed->'kt(* Can break soundness. *)valunsafe_mk:unit->'kt@@portablevalequality_witness:'kt->'jt->('k,'j)Type.eq@@portableend=structtypeinner:voidmodeverythingexternalmk_inner:unit->inner@@portable="%unbox_unit"typedummytype'kt=T:inner->dummyt[@@unboxed]typepacked=P:'kt->packed[@@unboxed]type'kboxed=Box:dummyboxedexternalunsafe_rebrand:'kt->'jt@@portable="%identity"externalunsafe_rebrand_boxed:'kboxed->'jboxed@@portable="%identity"let[@inline]unsafe_mk(typek)():kt=unsafe_rebrand(T(mk_inner()))letbox_=unsafe_rebrand_boxedBoxletunbox_=unsafe_mk()let[@inline]equality_witness(typekj)(T_:kt)(T_:jt):(k,j)Type.eq=Type.Equal;;endlet[@inline]current()=Access.P(Access.unsafe_mk())typeinitialletinitial=Access.(unsafe_mk())moduleTLS=Basement.Stdlib_shim.Domain.Safe.TLSletinitial_key=letkey=TLS.new_key(fun_->false)inTLS.setkeytrue;key;;letis_initial_thread()=TLS.getinitial_keyletis_initial_domain=ifBasement.Stdlib_shim.runtime5()thenStdlib.Domain.is_main_domainelsefun()->true;;modulePassword:sigtype'kt:voidmodcontendedexternal_portableunyieldingtype'kboxed:valuemodcontendedexternal_portableunyielding(* Can break the soundness of the API. *)valunsafe_mk:unit->'kt@local@@portablevalbox:'kt@local->'kboxed@localvalunbox:'kboxed@local->'kt@localmoduleShared:sigtype'kt:voidmodcontendedexternal_portableunyieldingtype'kboxed:valuemodcontendedexternal_portableunyieldingvalbox:'kt@local->'kboxed@local@@portablevalunbox:'kboxed@local->'kt@local@@portablevalborrow:('a:value_or_null)'k.'kt@local->('kt@forkablelocal->'a@unique)@forkablelocalonce->'a@unique@@portable(* Can break the soundness of the API. *)valunsafe_mk:unit->'kt@forkablelocal@@portableendvalshared:'kt@local->'kShared.t@local@@portableval%templatewith_current:('a:value_or_null)'k.'kAccess.t->('kt@local->'a@forkablelonceunique)@localonce->'a@forkablelonceunique@@portable[@@model=(local,global)]end=structtype'kt:voidmodcontendedexternal_portableunyieldingtype'kboxed=unitexternalunsafe_mk:unit->'kt@@portable="%unbox_unit"letbox_=()letunbox()=unsafe_mk()moduleShared=structtype'kt:voidmodcontendedexternal_portableunyieldingtype'kboxed=unitexternalunsafe_mk:unit->'kt@@portable="%unbox_unit"letbox_=()letunbox()=unsafe_mk()let[@inline]borrow_f=f(unsafe_mk())endexternalshared:'kt@local->'kShared.t@local@@portable="%identity"let%template[@inline]with_current_f=f(unsafe_mk())[@exclave_if_locall~reasons:[May_return_local]][@nontail][@@model=(local,global)];;endmoduleData=structtype('a,'k)t:valuemodeverythingwith'a@@contendedportableexternalunsafe_mk:('a[@local_opt])->(('a,'k)t[@local_opt])@@portable="%identity"externalunsafe_get:(('a,'k)t[@local_opt])->('a[@local_opt])@@portable="%identity"externalunsafe_mk_unique:('a[@local_opt])@unique->(('a,'k)t[@local_opt])@unique@@portable="%identity"externalunsafe_get_unique:(('a,'k)t[@local_opt])@unique->('a[@local_opt])@unique@@portable="%identity"externalunsafe_mk_once:('a[@local_opt])@once->(('a,'k)t[@local_opt])@once@@portable="%identity"externalunsafe_get_once:(('a,'k)t[@local_opt])@once->('a[@local_opt])@once@@portable="%identity"externalunsafe_mk_once_unique:('a[@local_opt])@onceunique->(('a,'k)t[@local_opt])@onceunique@@portable="%identity"externalunsafe_get_once_unique:(('a,'k)t[@local_opt])@onceunique->('a[@local_opt])@onceunique@@portable="%identity"let[@inline]wrap~access:_t=unsafe_mktlet[@inline]unwrap~access:_t=unsafe_gettlet[@inline]wrap_unique~access:_t=unsafe_mk_uniquetlet[@inline]unwrap_unique~access:_t=unsafe_get_uniquetlet[@inline]wrap_once~access:_t=unsafe_mk_oncetlet[@inline]unwrap_once~access:_t=unsafe_get_oncetlet[@inline]wrap_once_unique~access:_t=unsafe_mk_once_uniquetlet[@inline]unwrap_once_unique~access:_t=unsafe_get_once_uniquetlet[@inline]unwrap_shared~access:_t=unsafe_gettlet[@inline]createf=unsafe_mk(f())let[@inline]create_oncef=unsafe_mk_once(f())let[@inline]create_uniquef=unsafe_mk_unique(f())externalaliased:('a,'k)t->('aBasement.Stdlib_shim.Modes.Aliased.t,'k)t@@portable="%identity"let[@inline]map~password:_~ft=unsafe_mk(f(unsafe_gett))let[@inline]fstt=lett1,_=unsafe_gettinunsafe_mkt1;;let[@inline]sndt=let_,t2=unsafe_gettinunsafe_mkt2;;[@@@warning"-incompatible-with-upstream"]externalidx:('a,'k)t->(('a,'b)idx_imm[@unboxed])->('b,'k)t@@portable="%get_idx"let[@inline]botht1t2=unsafe_mk(unsafe_gett1,unsafe_gett2)let[@inline]both_uniquet1t2=unsafe_mk_unique(unsafe_get_uniquet1,unsafe_get_uniquet2);;let[@inline]extract~password:_~ft=f(unsafe_gett)letinject=unsafe_mkletproject=unsafe_getlet[@inline]project_shared~key:_t=unsafe_gettlet[@inline]project_shared_unique~key:_t=unsafe_get_uniquetlet[@inline]bind~password:_~ft=f(unsafe_gett)let[@inline]iter~password:_~ft=f(unsafe_gett)moduleShared=structtype('a,'k)data=('a,'k)ttype('a,'k)t=('a,'k)datalet[@inline]wrap~access:_v=unsafe_mkvlet[@inline]unwrap~access:_t=unsafe_gettlet[@inline]expose~key:_t=unsafe_gettlet[@inline]createf=unsafe_mk(f())let[@inline]map~password:_~ft=unsafe_mk(f(unsafe_gett))let[@inline]botht1t2=unsafe_mk(unsafe_gett1,unsafe_gett2)let[@inline]fstt=letx,_=unsafe_gettinunsafe_mkx;;let[@inline]sndt=let_,y=unsafe_gettinunsafe_mky;;[@@@warning"-incompatible-with-upstream"]externalidx:('a,'k)t->(('a,'b)idx_imm[@unboxed])->('b,'k)t@@portable="%get_idx"let[@inline]extract~password:_~ft=f(unsafe_gett)let[@inline]injectv=unsafe_mkvlet[@inline]projectt=unsafe_gettlet[@inline]bind~password:_~ft=f(unsafe_gett)let[@inline]iter~password:_~ft=f(unsafe_gett)let[@inline]map_into~password:_~ft=unsafe_mk(f(unsafe_gett))moduleLocal=structlet[@inline]wrap~access:_v=exclave_unsafe_mkvlet[@inline]unwrap~access:_t=exclave_unsafe_gettlet[@inline]createf=exclave_unsafe_mk(f())let[@inline]map~password:_~ft=exclave_unsafe_mk(f(unsafe_gett))let[@inline]botht1t2=exclave_unsafe_mk(unsafe_gett1,unsafe_gett2)let[@inline]fstt=exclave_letx,_=unsafe_gettinunsafe_mkx;;let[@inline]sndt=exclave_let_,y=unsafe_gettinunsafe_mky;;[@@@warning"-incompatible-with-upstream"]externalidx:(('a,'k)t[@local_opt])->(('a,'b)idx_imm[@unboxed])->(('b,'k)t[@local_opt])@@portable="%get_idx"let[@inline]extract~password:_~ft=exclave_f(unsafe_gett)let[@inline]injectv=exclave_unsafe_mkvlet[@inline]projectt=exclave_unsafe_gettlet[@inline]bind~password:_~ft=exclave_f(unsafe_gett)let[@inline]iter~password:_~ft=f(unsafe_gett)[@nontail]let[@inline]map_into~password:_~ft=exclave_unsafe_mk(f(unsafe_gett))endendlet[@inline]map_shared~password:_~ft=unsafe_mk(f(unsafe_gett))let[@inline]extract_shared~password:_~ft=f(unsafe_gett)moduleLocal=structlet[@inline]wrap~access:_t=exclave_unsafe_mktlet[@inline]unwrap~access:_t=exclave_unsafe_gettlet[@inline]wrap_unique~access:_t=exclave_unsafe_mk_uniquetlet[@inline]unwrap_unique~access:_t=exclave_unsafe_get_uniquetlet[@inline]wrap_once~access:_t=exclave_unsafe_mk_oncetlet[@inline]unwrap_once~access:_t=exclave_unsafe_get_oncetlet[@inline]unwrap_shared~access:_t=exclave_unsafe_gettlet[@inline]createf=exclave_unsafe_mk(f())let[@inline]create_uniquef=exclave_unsafe_mk_unique(f())let[@inline]map~password:_~ft=exclave_unsafe_mk(f(unsafe_gett))let[@inline]fstt=exclave_lett1,_=unsafe_gettinunsafe_mkt1;;let[@inline]sndt=exclave_let_,t2=unsafe_gettinunsafe_mkt2;;[@@@warning"-incompatible-with-upstream"]externalidx:('a,'k)t@local->(('a,'b)idx_imm[@unboxed])->('b,'k)t@local@@portable="%get_idx"let[@inline]botht1t2=exclave_unsafe_mk(unsafe_gett1,unsafe_gett2)let[@inline]extract~password:_~ft=exclave_f(unsafe_gett)let[@inline]injectv=exclave_unsafe_mkvlet[@inline]projectt=exclave_unsafe_gettlet[@inline]project_shared~key:_t=exclave_unsafe_gettlet[@inline]bind~password:_~ft=exclave_f(unsafe_gett)let[@inline]iter~password:_~ft=f(unsafe_gett)[@nontail]let[@inline]map_shared~password:_~ft=exclave_unsafe_mk(f(unsafe_gett))let[@inline]extract_shared~password:_~ft=exclave_f(unsafe_gett)endmoduleOr_null=structtype('a:value_or_null,'k)t:value_or_nullmodeverythingwith'a@@contendedportableexternal%templateunsafe_mk:('a:value_or_null)'k.('a[@local_opt])@u->(('a,'k)t[@local_opt])@u@@portable="%identity"[@@modeu=(aliased,unique)]externalunsafe_get:('a:value_or_null)'k.(('a,'k)t[@local_opt])->('a[@local_opt])@@portable="%identity"let[@inline]wrap~access:_t=unsafe_mktlet[@inline]unwrap~access:_t=unsafe_gettlet%template[@inline]createf=(unsafe_mk[@modeu])(f())[@@modeu=(aliased,unique)];;letproject=unsafe_getendexternal%templateunwrap_or_null:('aor_null,'k)Or_null.t@u->('a,'k)tor_null@u@@portable="%identity"[@@modeu=(aliased,unique)]endmoduleKey:sigtype'kt:voidmodcontendedexternal_forkablemanyportableunyieldingtypepacked=P:'kt->packed[@@unboxed]type'kboxed:valuemodcontendedexternal_forkablemanyportablevalunsafe_mk:unit->'kt@unique@@portablevalbox:'kt@unique->'kboxed@uniquevalunbox:'kboxed@unique->'kt@uniquevalbox_aliased:'kt->'kboxedvalunbox_aliased:'kboxed->'ktvalwith_password:('a:value_or_null)'k.'kt@unique->f:('kPassword.t@local->'a@unique)@localonce->#('a*'kt)@unique@@portablevalwith_password_local:('a:value_or_null)'k.'kt@unique->f:('kPassword.t@local->'a@local)@localonce->'a@local@@portablevalwith_password_shared:('a:value_or_null)'k.'kt@local->f:('kPassword.Shared.t@forkablelocal->'a@unique)@localonce->'a@unique@@portablevalwith_password_shared_local:('a:value_or_null)'k.'kt->f:('kPassword.Shared.t@local->'a@local)@localonce->'a@local@@portable[%%template:[@@@mode.defaultl=(local,global)]valaccess:('a:value_or_null)'k.'kt@unique->f:('kAccess.t->'a@contendedlonceportableunique)@localonceportable->#('a*'kt)@contendedlonceportableunique@@portablevalaccess_shared:('a:value_or_null)'k.'kt->f:('kAccess.t@shared->'a@contendedlonceportableunique)@localonceportable->'a@contendedlonceportableunique@@portable]valglobalize_unique:'kt@localunique->'kt@unique@@portablevaldestroy:'kt@localunique->'kAccess.t@@portableend=structtype'kt:voidmodcontendedexternal_forkablemanyportableunyieldingtypepacked=P:'kt->packed[@@unboxed]type'kboxed=unitexternalunsafe_mk:unit->'kt@unique@@portable="%unbox_unit"letbox_=()letunbox()=unsafe_mk()letbox_aliased_=()letunbox_aliased()=unsafe_mk()let[@inline]with_password_shared(typek)_~f=letpassword:kPassword.Shared.t=Password.Shared.unsafe_mk()infpassword[@nontail];;let[@inline]with_password_shared_local(typek)_~f=exclave_letpassword:kPassword.Shared.t=Password.Shared.unsafe_mk()infpassword;;let[@inline]with_password(typek)k~f=letpassword:kPassword.t=Password.unsafe_mk()in#(fpassword,k);;let[@inline]with_password_local(typek)_~f=exclave_letpassword:kPassword.t=Password.unsafe_mk()infpassword;;[%%template[@@@mode.defaultl=(local,global)]let[@inline]accessk~f=#(f(Access.unsafe_mk()),k)[@exclave_if_locall~reasons:[May_return_local]];;let[@inline]access_shared_~f=(letc:'kAccess.t=Access.unsafe_mk()infc)[@exclave_if_locall~reasons:[May_return_local]];;]let[@inline]globalize_unique_=unsafe_mk()let[@inline]destroy_=Access.unsafe_mk()endlet[@inline]create()=Key.P(Key.unsafe_mk())let[@inline]access_local~password:_~f=exclave_letc:_Access.t=Access.unsafe_mk()infc;;let[@inline]access~password:_~f=letc:_Access.t=Access.unsafe_mk()infc;;let[@inline]access_shared_local~password:_~f=exclave_letc:_Access.t=Access.unsafe_mk()infc;;let[@inline]access_shared~password~f=(access_shared_local~password~f:(funaccess->{global=faccess})).global;;