123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951952953954955956957958959960961962963964965966967968969970971972973974975976977978979980981982983984985986987988989990991992993994995996997998999100010011002100310041005100610071008100910101011101210131014101510161017101810191020102110221023102410251026102710281029103010311032103310341035103610371038103910401041104210431044104510461047104810491050105110521053105410551056105710581059106010611062106310641065106610671068106910701071107210731074107510761077107810791080108110821083108410851086108710881089109010911092109310941095109610971098109911001101110211031104110511061107110811091110111111121113111411151116111711181119112011211122112311241125112611271128112911301131113211331134113511361137113811391140114111421143114411451146114711481149115011511152115311541155115611571158115911601161116211631164116511661167116811691170117111721173117411751176117711781179118011811182118311841185118611871188118911901191119211931194(*
* Copyright (c) 2014 Leo White <lpw25@cl.cam.ac.uk>
*
* Permission to use, copy, modify, and distribute this software for any
* purpose with or without fee is hereby granted, provided that the above
* copyright notice and this permission notice appear in all copies.
*
* THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
* WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
* MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
* ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
* WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
* ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
* OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
*)moduleOcaml_ident=IdentmoduleOcaml_env=EnvopenNamesmoduleIdentifier=structtype'aid='aPaths_types.id={iv:'a;ihash:int;ikey:string}moduleId=Paths_types.Identifiertypet=Id.anytypet_pv=Id.any_pvletrecname_aux:t->string=funx->matchx.ivwith|`Root(_,name)->ModuleName.to_stringname|`Page(_,name)->PageName.to_stringname|`LeafPage(_,name)->PageName.to_stringname|`Module(_,name)->ModuleName.to_stringname|`Parameter(_,name)->ModuleName.to_stringname|`Resultx->name_aux(x:>t)|`ModuleType(_,name)->ModuleTypeName.to_stringname|`Type(_,name)->TypeName.to_stringname|`Constructor(_,name)->ConstructorName.to_stringname|`Field(_,name)->FieldName.to_stringname|`Extension(_,name)->ExtensionName.to_stringname|`ExtensionDecl(_,_,name)->ExtensionName.to_stringname|`Exception(_,name)->ExceptionName.to_stringname|`Value(_,name)->ValueName.to_stringname|`Class(_,name)->TypeName.to_stringname|`ClassType(_,name)->TypeName.to_stringname|`Method(_,name)->MethodName.to_stringname|`InstanceVariable(_,name)->InstanceVariableName.to_stringname|`Label(_,name)->LabelName.to_stringname|`SourcePage(_,name)->name|`SourceLocation(x,anchor)->name_aux(x:>t)^"#"^DefName.to_stringanchor|`SourceLocationModx->name_aux(x:>t)|`SourceLocationInternal(x,anchor)->name_aux(x:>t)^"#"^LocalName.to_stringanchor|`AssetFile(_,name)->AssetName.to_stringnameletrecis_hidden:t->bool=funx->matchx.ivwith|`Root(_,name)->ModuleName.is_hiddenname|`Page(_,_)->false|`LeafPage(_,_)->false|`Module(_,name)->ModuleName.is_hiddenname|`Parameter(_,name)->ModuleName.is_hiddenname|`Resultx->is_hidden(x:>t)|`ModuleType(_,name)->ModuleTypeName.is_hiddenname|`Type(_,name)->TypeName.is_hiddenname|`Constructor(parent,_)->is_hidden(parent:>t)|`Field(parent,_)->is_hidden(parent:>t)|`Extension(parent,_)->is_hidden(parent:>t)|`ExtensionDecl(parent,_,_)->is_hidden(parent:>t)|`Exception(parent,_)->is_hidden(parent:>t)|`Value(_,name)->ValueName.is_hiddenname|`Class(_,name)->TypeName.is_hiddenname|`ClassType(_,name)->TypeName.is_hiddenname|`Method(parent,_)->is_hidden(parent:>t)|`InstanceVariable(parent,_)->is_hidden(parent:>t)|`Label(parent,_)->is_hidden(parent:>t)|`SourceLocationMod_|`SourceLocation_|`SourcePage_|`SourceLocationInternal_|`AssetFile_->falseletname:[<t_pv]id->string=funn->name_aux(n:>t)letrecfull_name_aux:t->stringlist=funx->matchx.ivwith|`Root(_,name)->[ModuleName.to_stringname]|`Page(None,name)->[PageName.to_stringname]|`Page(Someparent,name)->PageName.to_stringname::full_name_aux(parent:>t)|`LeafPage(None,name)->[PageName.to_stringname]|`LeafPage(Someparent,name)->PageName.to_stringname::full_name_aux(parent:>t)|`Module(parent,name)->ModuleName.to_stringname::full_name_aux(parent:>t)|`Parameter(parent,name)->ModuleName.to_stringname::full_name_aux(parent:>t)|`Resultx->full_name_aux(x:>t)|`ModuleType(parent,name)->ModuleTypeName.to_stringname::full_name_aux(parent:>t)|`Type(parent,name)->TypeName.to_stringname::full_name_aux(parent:>t)|`Constructor(parent,name)->ConstructorName.to_stringname::full_name_aux(parent:>t)|`Field(parent,name)->FieldName.to_stringname::full_name_aux(parent:>t)|`Extension(parent,name)->ExtensionName.to_stringname::full_name_aux(parent:>t)|`ExtensionDecl(parent,_,name)->ExtensionName.to_stringname::full_name_aux(parent:>t)|`Exception(parent,name)->ExceptionName.to_stringname::full_name_aux(parent:>t)|`Value(parent,name)->ValueName.to_stringname::full_name_aux(parent:>t)|`Class(parent,name)->TypeName.to_stringname::full_name_aux(parent:>t)|`ClassType(parent,name)->TypeName.to_stringname::full_name_aux(parent:>t)|`Method(parent,name)->MethodName.to_stringname::full_name_aux(parent:>t)|`InstanceVariable(parent,name)->InstanceVariableName.to_stringname::full_name_aux(parent:>t)|`Label(parent,name)->LabelName.to_stringname::full_name_aux(parent:>t)|`SourceLocation(parent,name)->DefName.to_stringname::full_name_aux(parent:>t)|`SourceLocationInternal(parent,name)->LocalName.to_stringname::full_name_aux(parent:>t)|`SourceLocationModname->full_name_aux(name:>t)|`SourcePage(parent,name)->name::full_name_aux(parent:>t)|`AssetFile(parent,name)->AssetName.to_stringname::full_name_aux(parent:>t)letfullname:[<t_pv]id->stringlist=funn->List.rev@@full_name_aux(n:>t)letis_hidden:[<t_pv]id->bool=funn->is_hidden(n:>t)letreclabel_parent_aux=letopenIdinfun(n:non_src)->matchnwith|{iv=`Resulti;_}->label_parent_aux(i:>non_src)|{iv=`Root_;_}asp->(p:>label_parent)|{iv=`Page_;_}asp->(p:>label_parent)|{iv=`LeafPage_;_}asp->(p:>label_parent)|{iv=`Module(p,_);_}|{iv=`ModuleType(p,_);_}|{iv=`Parameter(p,_);_}|{iv=`Class(p,_);_}|{iv=`ClassType(p,_);_}|{iv=`Type(p,_);_}|{iv=`Extension(p,_);_}|{iv=`ExtensionDecl(p,_,_);_}|{iv=`Exception(p,_);_}|{iv=`Value(p,_);_}->(p:signature:>label_parent)|{iv=`Label(p,_);_}->p|{iv=`Method(p,_);_}|{iv=`InstanceVariable(p,_);_}->(p:class_signature:>label_parent)|{iv=`Constructor(p,_);_}->(p:datatype:>label_parent)|{iv=`Field(p,_);_}->(p:field_parent:>label_parent)letlabel_parentn=label_parent_aux(n:>Id.non_src)letequalxy=x.ihash=y.ihash&&x.ikey=y.ikeylethashx=x.ihashletcomparexy=comparex.ikeyy.ikeytypeany=ttypeany_pv=t_pvmoduletypeIdSig=sigtypettypet_pvvalequal:t->t->boolvalhash:t->intvalcompare:t->t->intendmoduleAny=structtypet=anytypet_pv=any_pvletequal=equallethash=hashletcompare=compareendmoduleSignature=structtypet=Id.signaturetypet_pv=Id.signature_pvletequal=equallethash=hashletcompare=compareendmoduleClassSignature=structtypet=Id.class_signaturetypet_pv=Id.class_signature_pvletequal=equallethash=hashletcompare=compareendmoduleDataType=structtypet=Id.datatypetypet_pv=Id.datatype_pvendmoduleFieldParent=structtypet=Paths_types.Identifier.field_parenttypet_pv=Paths_types.Identifier.field_parent_pvendmoduleLabelParent=structtypet=Id.label_parenttypet_pv=Id.label_parent_pvletequal=equallethash=hashletcompare=compareendmoduleRootModule=structtypet=Id.root_moduletypet_pv=Id.root_module_pvletequal=equallethash=hashletcompare=compareendmoduleModule=structtypet=Id.module_typet_pv=Id.module_pvletequal=equallethash=hashletcompare=compareendmoduleFunctorParameter=structtypet=Id.functor_parametertypet_pv=Id.functor_parameter_pvletequal=equallethash=hashletcompare=compareletfunctor_arg_pos{iv=`Parameter(p,_);_}=letrecinner_sig=function|`Result{iv=p;_}->1+inner_sigp|`Module_|`ModuleType_|`Root_|`Parameter_->1ininner_sigp.ivendmoduleFunctorResult=structtypet=Id.functor_resulttypet_pv=Id.functor_result_pvendmoduleModuleType=structtypet=Id.module_typetypet_pv=Id.module_type_pvletequal=equallethash=hashletcompare=compareendmoduleType=structtypet=Id.type_typet_pv=Id.type_pvletequal=equallethash=hashletcompare=compareendmoduleConstructor=structtypet=Id.constructortypet_pv=Id.constructor_pvendmoduleField=structtypet=Id.fieldtypet_pv=Id.field_pvendmoduleExtension=structtypet=Id.extensiontypet_pv=Id.extension_pvendmoduleExtensionDecl=structtypet=Paths_types.Identifier.extension_decltypet_pv=Paths_types.Identifier.extension_decl_pvletequal=equallethash=hashletcompare=compareendmoduleException=structtypet=Id.exception_typet_pv=Id.exception_pvendmoduleValue=structtypet=Id.valuetypet_pv=Id.value_pvendmoduleClass=structtypet=Id.class_typet_pv=Id.class_pvletequal=equallethash=hashletcompare=compareendmoduleClassType=structtypet=Id.class_typetypet_pv=Id.class_type_pvletequal=equallethash=hashletcompare=compareendmoduleMethod=structtypet=Id.method_typet_pv=Id.method_pvendmoduleInstanceVariable=structtypet=Id.instance_variabletypet_pv=Id.instance_variable_pvendmoduleLabel=structtypet=Paths_types.Identifier.labeltypet_pv=Paths_types.Identifier.label_pvletequal=equallethash=hashletcompare=compareendmodulePage=structtypet=Id.pagetypet_pv=Id.page_pvendmoduleLeafPage=structtypet=Id.leaf_pagetypet_pv=Id.leaf_page_pvletequal=equallethash=hashendmoduleContainerPage=structtypet=Id.container_pagetypet_pv=Id.container_page_pvletequal=equallethash=hashendmoduleNonSrc=structtypet=Paths_types.Identifier.non_srctypet_pv=Paths_types.Identifier.non_src_pvletequalxy=x.ihash=y.ihash&&x.ikey=y.ikeylethashx=x.ihashendmoduleSourcePage=structtypet=Id.source_pagetypet_pv=Id.source_page_pvletequal=equallethash=hashendmoduleSourceLocation=structtypet=Paths_types.Identifier.source_locationtypet_pv=Paths_types.Identifier.source_location_pvendmoduleAssetFile=structtypet=Id.asset_filetypet_pv=Id.asset_file_pvendmoduleOdocId=structtypet=Id.odoc_idtypet_pv=Id.odoc_id_pvendmodulePath=structmoduleModule=structtypet=Id.path_moduletypet_pv=Id.path_module_pvletequal=equallethash=hashletcompare=compareendmoduleModuleType=structtypet=Id.path_module_typetypet_pv=Id.module_type_pvletequal=equallethash=hashletcompare=compareendmoduleType=structtypet=Id.path_typetypet_pv=Id.path_type_pvletequal=equallethash=hashletcompare=compareendmoduleValue=structtypet=Id.path_valuetypet_pv=Id.value_pvletequal=equallethash=hashletcompare=compareendmoduleClassType=structtypet=Id.path_class_typetypet_pv=Id.path_class_type_pvletequal=equallethash=hashletcompare=compareendtypet=Id.path_anyendmoduleMaps=structmoduleAny=Map.Make(Any)moduleFunctorParameter=Map.Make(FunctorParameter)moduleModule=Map.Make(Module)moduleModuleType=Map.Make(ModuleType)moduleType=Map.Make(Type)moduleClass=Map.Make(Class)moduleClassType=Map.Make(ClassType)moduleLabel=Map.Make(Label)modulePath=structmoduleModule=Map.Make(Path.Module)moduleModuleType=Map.Make(Path.ModuleType)moduleType=Map.Make(Path.Type)moduleClassType=Map.Make(Path.ClassType)endendmoduleMk=structletmk_freshto_strtyfx=letikey=Printf.sprintf"%s_%s"ty(to_strx)inletihash=Hashtbl.hashikeyin{iv=fx;ihash;ikey}letmk_parentto_strtyf(parent,x)=letikey=Printf.sprintf"%s_%s.%s"ty(to_strx)parent.ikeyinletihash=Hashtbl.hashikeyin{iv=f(parent,x);ihash;ikey}letmk_parent_optto_strtyf(parent_opt,x)=letikey=matchparent_optwith|None->Printf.sprintf"%s_%s"ty(to_strx)|Somep->Printf.sprintf"%s_%s.%s"ty(to_strx)p.ikeyinletihash=Hashtbl.hashikeyin{iv=f(parent_opt,x);ihash;ikey}letpage:ContainerPage.toption*PageName.t->[>`PageofContainerPage.toption*PageName.t]id=mk_parent_optPageName.to_string"p"(fun(p,n)->`Page(p,n))letleaf_page:ContainerPage.toption*PageName.t->[>`LeafPageofContainerPage.toption*PageName.t]id=mk_parent_optPageName.to_string"lp"(fun(p,n)->`LeafPage(p,n))letasset_file:Page.t*AssetName.t->AssetFile.t=mk_parentAssetName.to_string"asset"(fun(p,n)->`AssetFile(p,n))letsource_page(container_page,name)=mk_parent(funx->x)"sp"(fun(p,rp)->`SourcePage(p,rp))(container_page,name)letroot:ContainerPage.toption*ModuleName.t->[>`RootofContainerPage.toption*ModuleName.t]id=mk_parent_optModuleName.to_string"r"(fun(p,n)->`Root(p,n))letimplementation=mk_fresh(funs->s)"impl"(funs->`Implementation(ModuleName.make_stds))letmodule_:Signature.t*ModuleName.t->[>`ModuleofSignature.t*ModuleName.t]id=mk_parentModuleName.to_string"m"(fun(p,n)->`Module(p,n))letparameter:Signature.t*ModuleName.t->[>`ParameterofSignature.t*ModuleName.t]id=mk_parentModuleName.to_string"p"(fun(p,n)->`Parameter(p,n))letresult:Signature.t->[>`ResultofSignature.t]id=funs->mk_parent(fun()->"__result__")""(fun(s,())->`Results)(s,())letmodule_type:Signature.t*ModuleTypeName.t->[>`ModuleTypeofSignature.t*ModuleTypeName.t]id=mk_parentModuleTypeName.to_string"mt"(fun(p,n)->`ModuleType(p,n))letclass_:Signature.t*TypeName.t->[>`ClassofSignature.t*TypeName.t]id=mk_parentTypeName.to_string"c"(fun(p,n)->`Class(p,n))letclass_type:Signature.t*TypeName.t->[>`ClassTypeofSignature.t*TypeName.t]id=mk_parentTypeName.to_string"ct"(fun(p,n)->`ClassType(p,n))lettype_:Signature.t*TypeName.t->[>`TypeofSignature.t*TypeName.t]id=mk_parentTypeName.to_string"t"(fun(p,n)->`Type(p,n))letcore_type=mk_fresh(funs->s)"coret"(funs->`CoreType(TypeName.make_stds))letconstructor:DataType.t*ConstructorName.t->[>`ConstructorofDataType.t*ConstructorName.t]id=mk_parentConstructorName.to_string"ctor"(fun(p,n)->`Constructor(p,n))letfield:FieldParent.t*FieldName.t->[>`FieldofFieldParent.t*FieldName.t]id=mk_parentFieldName.to_string"fld"(fun(p,n)->`Field(p,n))letextension:Signature.t*ExtensionName.t->[>`ExtensionofSignature.t*ExtensionName.t]id=mk_parentExtensionName.to_string"extn"(fun(p,n)->`Extension(p,n))letextension_decl:Signature.t*(ExtensionName.t*ExtensionName.t)->[>`ExtensionDeclofSignature.t*ExtensionName.t*ExtensionName.t]id=mk_parent(fun(n,m)->ExtensionName.to_stringn^"."^ExtensionName.to_stringm)"extn-decl"(fun(p,(n,m))->`ExtensionDecl(p,n,m))letexception_:Signature.t*ExceptionName.t->[>`ExceptionofSignature.t*ExceptionName.t]id=mk_parentExceptionName.to_string"exn"(fun(p,n)->`Exception(p,n))letvalue:Signature.t*ValueName.t->[>`ValueofSignature.t*ValueName.t]id=mk_parentValueName.to_string"v"(fun(p,n)->`Value(p,n))letmethod_:ClassSignature.t*MethodName.t->[>`MethodofClassSignature.t*MethodName.t]id=mk_parentMethodName.to_string"m"(fun(p,n)->`Method(p,n))letinstance_variable:ClassSignature.t*InstanceVariableName.t->[>`InstanceVariableofClassSignature.t*InstanceVariableName.t]id=mk_parentInstanceVariableName.to_string"iv"(fun(p,n)->`InstanceVariable(p,n))letlabel:LabelParent.t*LabelName.t->[>`LabelofLabelParent.t*LabelName.t]id=mk_parentLabelName.to_string"l"(fun(p,n)->`Label(p,n))letsource_location:SourcePage.t*DefName.t->[>`SourceLocationofSourcePage.t*DefName.t]id=mk_parentDefName.to_string"sl"(fun(p,n)->`SourceLocation(p,n))letsource_location_mod:SourcePage.t->[>`SourceLocationModofSourcePage.t]id=funs->mk_parent(fun()->"__slm__")""(fun(s,())->`SourceLocationMods)(s,())letsource_location_int:SourcePage.t*LocalName.t->[>`SourceLocationInternalofSourcePage.t*LocalName.t]id=mk_parentLocalName.to_string"sli"(fun(p,n)->`SourceLocationInternal(p,n))endmoduleHashtbl=structmoduleAny=Hashtbl.Make(Any)moduleContainerPage=Hashtbl.Make(ContainerPage)moduleLeafPage=Hashtbl.Make(LeafPage)moduleRootModule=Hashtbl.Make(RootModule)moduleSourcePage=Hashtbl.Make(SourcePage)endendmodulePath=structtypet=Paths_types.Path.anyletrecis_resolved_hidden:weak_canonical_test:bool->Paths_types.Resolved_path.any->bool=fun~weak_canonical_testx->letopenPaths_types.Resolved_pathinletrecinner:Paths_types.Resolved_path.any->bool=function|`Identifier{iv=`ModuleType(_,m);_}whenNames.ModuleTypeName.is_hiddenm->true|`Identifier{iv=`Type(_,t);_}whenNames.TypeName.is_hiddent->true|`Identifier{iv=`Module(_,m);_}whenNames.ModuleName.is_hiddenm->true|`Identifier_->false|`Canonical(_,`Resolved_)->false|`Canonical(x,_)->(notweak_canonical_test)&&inner(x:module_:>any)|`Hidden_->true|`Subst(p1,p2)->inner(p1:module_type:>any)||inner(p2:module_:>any)|`Module(p,_)->inner(p:module_:>any)|`Apply(p,_)->inner(p:module_:>any)|`ModuleType(_,m)whenNames.ModuleTypeName.is_hiddenm->true|`ModuleType(p,_)->inner(p:module_:>any)|`Type(_,t)whenNames.TypeName.is_hiddent->true|`CoreTypet->Names.TypeName.is_hiddent|`Type(p,_)->inner(p:module_:>any)|`Value(_,t)whenNames.ValueName.is_hiddent->true|`Value(p,_)->inner(p:module_:>any)|`Class(p,_)->inner(p:module_:>any)|`ClassType(p,_)->inner(p:module_:>any)|`Alias(dest,`Resolvedsrc)->inner(dest:module_:>any)&&inner(src:module_:>any)|`Alias(dest,src)->inner(dest:module_:>any)&&is_path_hidden(src:>Paths_types.Path.any)|`AliasModuleType(p1,p2)->inner(p1:module_type:>any)&&inner(p2:module_type:>any)|`SubstT(p1,p2)->inner(p1:>any)||inner(p2:>any)|`Substitutedm->inner(m:>any)|`SubstitutedMTm->inner(m:>any)|`SubstitutedTm->inner(m:>any)|`SubstitutedCTm->inner(m:>any)|`CanonicalModuleType(_,`Resolved_)->false|`CanonicalModuleType(x,_)->inner(x:module_type:>any)|`CanonicalType(_,`Resolved_)->false|`CanonicalType(x,_)->inner(x:type_:>any)|`OpaqueModulem->inner(m:>any)|`OpaqueModuleTypemt->inner(mt:>any)ininnerxandis_path_hidden:Paths_types.Path.any->bool=letopenPaths_types.Pathinfunction|`Resolvedr->is_resolved_hidden~weak_canonical_test:falser|`Identifier(_,hidden)->hidden|`Substitutedr->is_path_hidden(r:>any)|`SubstitutedMTr->is_path_hidden(r:>any)|`SubstitutedTr->is_path_hidden(r:>any)|`SubstitutedCTr->is_path_hidden(r:>any)|`Roots->ModuleName.is_hiddens|`Forward_->false|`Dot(p,n)->ModuleName.is_hiddenn||is_path_hidden(p:module_:>any)|`DotMT(p,n)->ModuleTypeName.is_hiddenn||is_path_hidden(p:module_:>any)|`DotT(p,n)->TypeName.is_hiddenn||is_path_hidden(p:module_:>any)|`DotV(p,n)->ValueName.is_hiddenn||is_path_hidden(p:module_:>any)|`Apply(p1,p2)->is_path_hidden(p1:module_:>any)||is_path_hidden(p2:module_:>any)moduleResolved=structtypet=Paths_types.Resolved_path.anyletrecparent_module_type_identifier:Paths_types.Resolved_path.module_type->Identifier.ModuleType.t=function|`Identifierid->(id:Identifier.ModuleType.t)|`ModuleType(m,n)->Identifier.Mk.module_type(parent_module_identifierm,n)|`SubstT(m,_n)->parent_module_type_identifierm|`CanonicalModuleType(_,`Resolvedp)->parent_module_type_identifierp|`CanonicalModuleType(p,_)->parent_module_type_identifierp|`OpaqueModuleTypemt->parent_module_type_identifiermt|`SubstitutedMTm->parent_module_type_identifierm|`AliasModuleType(sub,orig)->ifis_resolved_hidden~weak_canonical_test:false(sub:>t)thenparent_module_type_identifierorigelseparent_module_type_identifiersubandparent_module_identifier:Paths_types.Resolved_path.module_->Identifier.Signature.t=function|`Identifierid->(id:Identifier.Path.Module.t:>Identifier.Signature.t)|`Subst(sub,_)->(parent_module_type_identifiersub:>Identifier.Signature.t)|`Hiddenp->parent_module_identifierp|`Module(m,n)->Identifier.Mk.module_(parent_module_identifierm,n)|`Canonical(_,`Resolvedp)->parent_module_identifierp|`Canonical(p,_)->parent_module_identifierp|`Apply(m,_)->parent_module_identifierm|`Alias(dest,`Resolvedsrc)->ifis_resolved_hidden~weak_canonical_test:false(dest:>t)thenparent_module_identifiersrcelseparent_module_identifierdest|`Alias(dest,_src)->parent_module_identifierdest|`Substitutedm->parent_module_identifierm|`OpaqueModulem->parent_module_identifiermmoduleModule=structtypet=Paths_types.Resolved_path.module_letis_hiddenm=is_resolved_hidden(m:t:>Paths_types.Resolved_path.any)endmoduleModuleType=structtypet=Paths_types.Resolved_path.module_typeletidentifier:t->Identifier.ModuleType.t=parent_module_type_identifierendmoduleType=structtypet=Paths_types.Resolved_path.type_endmoduleValue=structtypet=Paths_types.Resolved_path.valueendmoduleClassType=structtypet=Paths_types.Resolved_path.class_typeendletrecidentifier:t->Identifier.toption=function|`Identifierid->Someid|`CoreType_->None|`Subst(sub,_)->identifier(sub:>t)|`Hiddenp->identifier(p:>t)|`Module(m,n)->Some(Identifier.Mk.module_(parent_module_identifierm,n))|`Canonical(_,`Resolvedp)->identifier(p:>t)|`Canonical(p,_)->identifier(p:>t)|`Apply(m,_)->identifier(m:>t)|`Type(m,n)->Some(Identifier.Mk.type_(parent_module_identifierm,n))|`Value(m,n)->Some(Identifier.Mk.value(parent_module_identifierm,n))|`ModuleType(m,n)->Some(Identifier.Mk.module_type(parent_module_identifierm,n))|`Class(m,n)->Some(Identifier.Mk.class_(parent_module_identifierm,n))|`ClassType(m,n)->Some(Identifier.Mk.class_type(parent_module_identifierm,n))|`Alias(dest,`Resolvedsrc)->ifis_resolved_hidden~weak_canonical_test:false(dest:>t)thenidentifier(src:>t)elseidentifier(dest:>t)|`Alias(dest,_src)->identifier(dest:>t)|`AliasModuleType(sub,orig)->ifis_resolved_hidden~weak_canonical_test:false(sub:>t)thenidentifier(orig:>t)elseidentifier(sub:>t)|`SubstT(p,_)->identifier(p:>t)|`CanonicalModuleType(_,`Resolvedp)->identifier(p:>t)|`CanonicalModuleType(p,_)->identifier(p:>t)|`CanonicalType(_,`Resolvedp)->identifier(p:>t)|`CanonicalType(p,_)->identifier(p:>t)|`OpaqueModulem->identifier(m:>t)|`OpaqueModuleTypemt->identifier(mt:>t)|`Substitutedm->identifier(m:>t)|`SubstitutedMTm->identifier(m:>t)|`SubstitutedCTm->identifier(m:>t)|`SubstitutedTm->identifier(m:>t)letis_hiddenr=is_resolved_hidden~weak_canonical_test:falserendmoduleModule=structtypet=Paths_types.Path.module_endmoduleModuleType=structtypet=Paths_types.Path.module_typeendmoduleType=structtypet=Paths_types.Path.type_endmoduleValue=structtypet=Paths_types.Path.valueendmoduleClassType=structtypet=Paths_types.Path.class_typeendletis_hidden=is_path_hiddenendmoduleFragment=structmoduleResolved=structtypet=Paths_types.Resolved_fragment.anytyperoot=Paths_types.Resolved_fragment.rootmoduleSignature=structtypet=Paths_types.Resolved_fragment.signatureletrecsgidentifier:t->Identifier.Signature.t=function|`Root(`ModuleTypei)->(Path.Resolved.parent_module_type_identifieri:>Identifier.Signature.t)|`Root(`Modulei)->Path.Resolved.parent_module_identifieri|`Subst(s,_)->(Path.Resolved.parent_module_type_identifiers:>Identifier.Signature.t)|`Alias(i,_)->Path.Resolved.parent_module_identifieri|`Module(m,n)->Identifier.Mk.module_(sgidentifierm,n)|`OpaqueModulem->sgidentifier(m:>t)endmoduleModule=structtypet=Paths_types.Resolved_fragment.module_endmoduleModuleType=structtypet=Paths_types.Resolved_fragment.module_typeendmoduleType=structtypet=Paths_types.Resolved_fragment.type_endtypeleaf=Paths_types.Resolved_fragment.leafletrecidentifier:t->Identifier.t=function|`Root(`ModuleType_r)->assertfalse|`Root(`Module_r)->assertfalse|`Subst(s,_)->(Path.Resolved.ModuleType.identifiers:>Identifier.t)|`Alias(p,_)->(Path.Resolved.parent_module_identifierp:>Identifier.t)|`Module(m,n)->Identifier.Mk.module_(Signature.sgidentifierm,n)|`Module_type(m,n)->Identifier.Mk.module_type(Signature.sgidentifierm,n)|`Type(m,n)->Identifier.Mk.type_(Signature.sgidentifierm,n)|`Class(m,n)->Identifier.Mk.class_(Signature.sgidentifierm,n)|`ClassType(m,n)->Identifier.Mk.class_type(Signature.sgidentifierm,n)|`OpaqueModulem->identifier(m:>t)letrecis_hidden:t->bool=function|`Root(`ModuleTyper)->Path.Resolved.(is_hidden(r:>t))|`Root(`Moduler)->Path.Resolved.(is_hidden(r:>t))|`Subst(s,_)->Path.Resolved.(is_hidden(s:>t))|`Alias(s,_)->Path.Resolved.(is_hidden(s:>t))|`Module(m,_)|`Module_type(m,_)|`Type(m,_)|`Class(m,_)|`ClassType(m,_)->is_hidden(m:>t)|`OpaqueModulem->is_hidden(m:>t)endtypet=Paths_types.Fragment.anymoduleSignature=structtypet=Paths_types.Fragment.signatureendmoduleModule=structtypet=Paths_types.Fragment.module_endmoduleModuleType=structtypet=Paths_types.Fragment.module_typeendmoduleType=structtypet=Paths_types.Fragment.type_endtypeleaf=Paths_types.Fragment.leafendmoduleReference=structmoduleResolved=structopenPaths_types.Resolved_referencetypet=Paths_types.Resolved_reference.anyletrecparent_signature_identifier:signature->Identifier.Signature.t=function|`Identifierid->id|`Hiddens->parent_signature_identifier(s:>signature)|`Alias(sub,orig)->ifPath.Resolved.(is_hidden(sub:>t))thenparent_signature_identifier(orig:>signature)else(Path.Resolved.parent_module_identifiersub:>Identifier.Signature.t)|`AliasModuleType(sub,orig)->ifPath.Resolved.(is_hidden(sub:>t))thenparent_signature_identifier(orig:>signature)else(Path.Resolved.parent_module_type_identifiersub:>Identifier.Signature.t)|`Module(m,n)->Identifier.Mk.module_(parent_signature_identifierm,n)|`ModuleType(m,s)->Identifier.Mk.module_type(parent_signature_identifierm,s)andparent_type_identifier:datatype->Identifier.DataType.t=function|`Identifierid->id|`Type(sg,s)->Identifier.Mk.type_(parent_signature_identifiersg,s)andparent_class_signature_identifier:class_signature->Identifier.ClassSignature.t=function|`Identifierid->id|`Class(sg,s)->Identifier.Mk.class_(parent_signature_identifiersg,s)|`ClassType(sg,s)->Identifier.Mk.class_type(parent_signature_identifiersg,s)andfield_parent_identifier:field_parent->Identifier.FieldParent.t=function|`Identifierid->id|(`Hidden_|`Alias_|`AliasModuleType_|`Module_|`ModuleType_)assg->(parent_signature_identifiersg:>Identifier.FieldParent.t)|`Type_ast->(parent_type_identifiert:>Identifier.FieldParent.t)andlabel_parent_identifier:label_parent->Identifier.LabelParent.t=function|`Identifierid->id|(`Class_|`ClassType_)asc->(parent_class_signature_identifierc:>Identifier.LabelParent.t)|(`Hidden_|`Alias_|`AliasModuleType_|`Module_|`ModuleType_|`Type_)asr->(field_parent_identifierr:>Identifier.LabelParent.t)andidentifier:t->Identifier.t=function|`Identifierid->id|(`Alias_|`AliasModuleType_|`Module_|`Hidden_|`Type_|`Class_|`ClassType_|`ModuleType_)asr->(label_parent_identifierr:>Identifier.t)|`Field(p,n)->Identifier.Mk.field(field_parent_identifierp,n)|`PolyConstructor(s,n)->(* Uses an identifier for constructor even though it is not
one. Document must make the links correspond. *)Identifier.Mk.constructor((parent_type_identifiers:>Identifier.DataType.t),n)|`Constructor(s,n)->Identifier.Mk.constructor((parent_type_identifiers:>Identifier.DataType.t),n)|`Extension(p,q)->Identifier.Mk.extension(parent_signature_identifierp,q)|`ExtensionDecl(p,q,r)->Identifier.Mk.extension_decl(parent_signature_identifierp,(q,r))|`Exception(p,q)->Identifier.Mk.exception_(parent_signature_identifierp,q)|`Value(p,q)->Identifier.Mk.value(parent_signature_identifierp,q)|`Method(p,q)->Identifier.Mk.method_(parent_class_signature_identifierp,q)|`InstanceVariable(p,q)->Identifier.Mk.instance_variable(parent_class_signature_identifierp,q)|`Label(p,q)->Identifier.Mk.label(label_parent_identifierp,q)moduleSignature=structtypet=Paths_types.Resolved_reference.signatureendmoduleClassSignature=structtypet=Paths_types.Resolved_reference.class_signatureendmoduleDataType=structtypet=Paths_types.Resolved_reference.datatypeendmoduleFieldParent=structtypet=Paths_types.Resolved_reference.field_parentendmoduleLabelParent=structtypet=Paths_types.Resolved_reference.label_parentendmoduleModule=structtypet=Paths_types.Resolved_reference.module_endmoduleModuleType=structtypet=Paths_types.Resolved_reference.module_typeendmoduleType=structtypet=Paths_types.Resolved_reference.type_endmoduleConstructor=structtypet=Paths_types.Resolved_reference.constructorendmoduleField=structtypet=Paths_types.Resolved_reference.fieldendmoduleExtension=structtypet=Paths_types.Resolved_reference.extensionendmoduleExtensionDecl=structtypet=Paths_types.Resolved_reference.extension_declendmoduleException=structtypet=Paths_types.Resolved_reference.exception_endmoduleValue=structtypet=Paths_types.Resolved_reference.valueendmoduleClass=structtypet=Paths_types.Resolved_reference.class_endmoduleClassType=structtypet=Paths_types.Resolved_reference.class_typeendmoduleMethod=structtypet=Paths_types.Resolved_reference.method_endmoduleInstanceVariable=structtypet=Paths_types.Resolved_reference.instance_variableendmoduleLabel=structtypet=Paths_types.Resolved_reference.labelendmodulePage=structtypet=Paths_types.Resolved_reference.pageendmoduleAsset=structletidentifier=function`Identifierid->idtypet=Paths_types.Resolved_reference.assetendendtypet=Paths_types.Reference.anytypetag_any=Paths_types.Reference.tag_anytypetag_hierarchy=Paths_types.Reference.tag_hierarchymoduleSignature=structtypet=Paths_types.Reference.signatureendmoduleClassSignature=structtypet=Paths_types.Reference.class_signatureendmoduleDataType=structtypet=Paths_types.Reference.datatypeendmoduleFragmentTypeParent=structtypet=Paths_types.Reference.fragment_type_parentendmoduleLabelParent=structtypet=Paths_types.Reference.label_parentendmoduleModule=structtypet=Paths_types.Reference.module_endmoduleModuleType=structtypet=Paths_types.Reference.module_typeendmoduleType=structtypet=Paths_types.Reference.type_endmoduleConstructor=structtypet=Paths_types.Reference.constructorendmoduleField=structtypet=Paths_types.Reference.fieldendmoduleExtension=structtypet=Paths_types.Reference.extensionendmoduleExtensionDecl=structtypet=Paths_types.Reference.extension_declendmoduleException=structtypet=Paths_types.Reference.exception_endmoduleValue=structtypet=Paths_types.Reference.valueendmoduleClass=structtypet=Paths_types.Reference.class_endmoduleClassType=structtypet=Paths_types.Reference.class_typeendmoduleMethod=structtypet=Paths_types.Reference.method_endmoduleInstanceVariable=structtypet=Paths_types.Reference.instance_variableendmoduleLabel=structtypet=Paths_types.Reference.labelendmodulePage=structtypet=Paths_types.Reference.pageendmoduleAsset=structtypet=Paths_types.Reference.assetendmoduleHierarchy=structtypet=Paths_types.Reference.hierarchyendend