1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798991001011021031041051061071081091101111121131141151161171181191201211221231241251261271281291301311321331341351361371381391401411421431441451461471481491501511521531541551561571581591601611621631641651661671681691701711721731741751761771781791801811821831841851861871881891901911921931941951961971981992002012022032042052062072082092102112122132142152162172182192202212222232242252262272282292302312322332342352362372382392402412422432442452462472482492502512522532542552562572582592602612622632642652662672682692702712722732742752762772782792802812822832842852862872882892902912922932942952962972982993003013023033043053063073083093103113123133143153163173183193203213223233243253263273283293303313323333343353363373383393403413423433443453463473483493503513523533543553563573583593603613623633643653663673683693703713723733743753763773783793803813823833843853863873883893903913923933943953963973983994004014024034044054064074084094104114124134144154164174184194204214224234244254264274284294304314324334344354364374384394404414424434444454464474484494504514524534544554564574584594604614624634644654664674684694704714724734744754764774784794804814824834844854864874884894904914924934944954964974984995005015025035045055065075085095105115125135145155165175185195205215225235245255265275285295305315325335345355365375385395405415425435445455465475485495505515525535545555565575585595605615625635645655665675685695705715725735745755765775785795805815825835845855865875885895905915925935945955965975985996006016026036046056066076086096106116126136146156166176186196206216226236246256266276286296306316326336346356366376386396406416426436446456466476486496506516526536546556566576586596606616626636646656666676686696706716726736746756766776786796806816826836846856866876886896906916926936946956966976986997007017027037047057067077087097107117127137147157167177187197207217227237247257267277287297307317327337347357367377387397407417427437447457467477487497507517527537547557567577587597607617627637647657667677687697707717727737747757767777787797807817827837847857867877887897907917927937947957967977987998008018028038048058068078088098108118128138148158168178188198208218228238248258268278288298308318328338348358368378388398408418428438448458468478488498508518528538548558568578588598608618628638648658668678688698708718728738748758768778788798808818828838848858868878888898908918928938948958968978988999009019029039049059069079089099109119129139149159169179189199209219229239249259269279289299309319329339349359369379389399409419429439449459469479489499509519529539549559569579589599609619629639649659669679689699709719729739749759769779789799809819829839849859869879889899909919929939949959969979989991000100110021003100410051006100710081009101010111012101310141015101610171018101910201021102210231024102510261027102810291030103110321033103410351036103710381039104010411042104310441045104610471048104910501051105210531054105510561057105810591060106110621063106410651066106710681069107010711072107310741075107610771078107910801081108210831084108510861087108810891090109110921093109410951096109710981099110011011102110311041105110611071108110911101111111211131114111511161117111811191120112111221123112411251126112711281129113011311132113311341135113611371138113911401141114211431144114511461147114811491150115111521153115411551156115711581159116011611162116311641165116611671168116911701171117211731174117511761177117811791180118111821183118411851186118711881189(*
* 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|`CoreTypename->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|`CoreExceptionname->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(dir,name)->name_aux(dir:>t)^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|`CoreTypename->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)|`CoreException_->false|`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)|`CoreTypename->[TypeName.to_stringname]|`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)|`CoreExceptionname->[ExceptionName.to_stringname]|`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=`CoreType_;_}|{iv=`CoreException_;_}->assertfalse|{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_pvendmoduleSourceLocation=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))letcore_exception=mk_fresh(funs->s)"coreexn"(funs->`CoreException(ExceptionName.make_stds))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)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|`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.Signature.t=function|`Identifierid->(id:Identifier.ModuleType.t:>Identifier.Signature.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|`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_typeendmoduleType=structtypet=Paths_types.Resolved_path.type_endmoduleValue=structtypet=Paths_types.Resolved_path.valueendmoduleClassType=structtypet=Paths_types.Resolved_path.class_typeendletrecidentifier:t->Identifier.t=function|`Identifierid->id|`Subst(sub,_)->identifier(sub:>t)|`Hiddenp->identifier(p:>t)|`Module(m,n)->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)->Identifier.Mk.type_(parent_module_identifierm,n)|`Value(m,n)->Identifier.Mk.value(parent_module_identifierm,n)|`ModuleType(m,n)->Identifier.Mk.module_type(parent_module_identifierm,n)|`Class(m,n)->Identifier.Mk.class_(parent_module_identifierm,n)|`ClassType(m,n)->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|`Root(`Modulei)->Path.Resolved.parent_module_identifieri|`Subst(s,_)->Path.Resolved.parent_module_type_identifiers|`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.identifier(s:>Path.Resolved.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