123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379openOdoc_modelopenNamesmoduleTools_error=structopenPaths(** Errors raised by Tools *)typehandle_subs_error=[`UnresolvedPathof[`ModuleofCpath.module_](* Failed to resolve a module path when applying a fragment item *)]typereference_kind=[`S|`T|`C|`CT|`Page|`Cons|`Field|`UnboxedField|`Label|`Page_path|`Module_path|`Asset_path|`Any_path]typepath_kind=[`Page|`Unit]typeexpansion_of_module_error=[`OpaqueModule(* The module does not have an expansion *)|`UnresolvedForwardPath(* The module signature depends upon a forward path *)|`UnresolvedPathof[`ModuleofCpath.module_*simple_module_lookup_error|`ModuleTypeofCpath.module_type*simple_module_type_lookup_error](* The path to the module or module type could not be resolved *)|`UnresolvedOriginalPathofCpath.module_*simple_module_lookup_error]andsimple_module_lookup_error=[`LocalofEnv.t*Ident.module_(* Internal error: Found local path during lookup *)|`Find_failure|(* Internal error: the module was not found in the parent signature *)`Lookup_failureofIdentifier.Path.Module.t(* Could not find the module in the environment *)|`Lookup_failure_rootofModuleName.t(* Could not find the root module *)|`Parentofparent_lookup_error]andsimple_module_type_expr_of_module_error=[`ApplyNotFunctor(* Internal error: attempt made to apply a module that's not a functor *)|`OpaqueModule(* The module does not have an expansion *)|`UnresolvedForwardPath(* The module signature depends upon a forward path *)|`UnresolvedPathof[`ModuleofCpath.module_*simple_module_lookup_error|`ModuleTypeofCpath.module_type*simple_module_type_lookup_error]|`Parentofparent_lookup_error]andsimple_module_type_lookup_error=[`LocalMTofEnv.t*Ident.module_type(* Internal error: Found local path during lookup *)|`Find_failure(* Internal error: the module was not found in the parent signature *)|`Lookup_failureMTofIdentifier.ModuleType.t(* Could not find the module in the environment *)|`Parentofparent_lookup_error]andsimple_type_lookup_error=[`LocalTypeofEnv.t*Ident.type_(* Internal error: Found local path during lookup *)|`Class_replaced(* Class was replaced with a destructive substitution and we're not sure
what to do now *)|`OpaqueClass(* Couldn't resolve class signature. *)|`Find_failure(* Internal error: the type was not found in the parent signature *)|`Lookup_failureTofIdentifier.Path.Type.t(* Could not find the module in the environment *)|`Parentofparent_lookup_error]andsimple_value_lookup_error=[`LocalValueofEnv.t*Ident.value(* Internal error: Found local path during lookup *)|`Find_failure(* Internal error: the type was not found in the parent signature *)|`Lookup_failureVofIdentifier.Path.Value.t(* Could not find the module in the environment *)|`Parentofparent_lookup_error]andparent_lookup_error=[`Parent_sigofexpansion_of_module_error(* Error found while calculating the parent signature *)|`Parent_module_typeofsimple_module_type_lookup_error(* Error found while looking up parent module type *)|`Parent_exprofsimple_module_type_expr_of_module_error(* Error found while evaluating parent module expression *)|`Parent_moduleofsimple_module_lookup_error(* Error found while looking up parent module *)|`Parent_typeofsimple_type_lookup_error|`Fragment_root(* Encountered unexpected fragment root *)|`Parentofparent_lookup_error|`Referenceofreference_lookup_error]andreference_lookup_error=[`Wrong_kindofreference_kindlist*reference_kind(* Expected, got *)|`Lookup_by_nameof[reference_kind|`Any]*string|`Find_by_nameof[reference_kind|`Any]*string|`Path_errorof[`Not_found|`Is_directory|`Wrong_kindofpath_kindlist*path_kind]*Reference.tag_hierarchy*stringlist|`Parentofparent_lookup_error]typeany=[simple_type_lookup_error|simple_value_lookup_error|simple_module_type_lookup_error|simple_module_type_expr_of_module_error|simple_module_lookup_error|expansion_of_module_error|parent_lookup_error]letpp_reference_kindfmtk=letk=matchkwith|`S->"signature"|`T->"type"|`C->"class"|`CT->"class type"|`Page->"page"|`Cons->"constructor"|`Field->"field"|`UnboxedField->"unboxed field"|`Label->"label"|`Page_path->"path to a page"|`Module_path->"path to a module"|`Asset_path->"path to an asset"|`Any_path->"path"inFormat.pp_print_stringfmtkletfpf=Format.fprintfletpp_human_listpp_afmtlst=matchList.revlstwith|[]->()|[one]->pp_afmtone|last::rev_tl->letpp_sepfmt()=fpffmt", "infpffmt"%a and %a"(Format.pp_print_list~pp_seppp_a)rev_tlpp_alastletpp_pathfmt(tag,p)=lettag=matchtagwith|`TRelativePath->""|`TAbsolutePath->"/"|`TCurrentPackage->"//"inletpp_sepfmt()=fpffmt"/"infpffmt"%s%a"tag(Format.pp_print_list~pp_sepFormat.pp_print_string)pletpp_path_kindfmt=function|`Unit->fpffmt"module"|`Page->fpffmt"page"letpp_path_errorfmterrtagpath=matcherrwith|`Not_found->fpffmt"Path '%a' not found"pp_path(tag,path)|`Is_directory->fpffmt"Path '%a' points to directory"pp_path(tag,path)|`Wrong_kind(expected,got)->fpffmt"Path '%a' is of kind %a but was expected %a"pp_path(tag,path)pp_path_kindgot(pp_human_listpp_path_kind)expectedletrecpp:Format.formatter->any->unit=funfmterr->letopenComponent.Fmtinletc=defaultinmatcherrwith|`OpaqueModule->Format.fprintffmt"OpaqueModule"|`OpaqueClass->Format.fprintffmt"Class is abstract"|`UnresolvedForwardPath->Format.fprintffmt"Unresolved forward path"|`UnresolvedPath(`Module(p,e))->Format.fprintffmt"Unresolved module path %a (%a)"(module_pathc)ppp(e:>any)|`UnresolvedPath(`ModuleType(p,e))->Format.fprintffmt"Unresolved module type path %a (%a)"(module_type_pathc)ppp(e:>any)|`UnresolvedOriginalPath(p,e)->Format.fprintffmt"Unresolved original module path %a (%a)"Component.Fmt.(module_pathdefault)ppp(e:>any)|`LocalMT(_,id)->Format.fprintffmt"Local id found: %a"Ident.fmtid|`Local(_,id)->Format.fprintffmt"Local id found: %a"Ident.fmtid|`LocalType(_,id)->Format.fprintffmt"Local id found: %a"Ident.fmtid|`LocalValue(_,id)->Format.fprintffmt"Local id found: %a"Ident.fmtid|`Find_failure->Format.fprintffmt"Find failure"|`Lookup_failurem->Format.fprintffmt"Lookup failure (module): %a"(model_identifierc)(m:>Odoc_model.Paths.Identifier.t)|`Lookup_failure_rootr->Format.fprintffmt"Lookup failure (root module): %a"ModuleName.fmtr|`Lookup_failureMTm->Format.fprintffmt"Lookup failure (module type): %a"(model_identifierc)(m:>Odoc_model.Paths.Identifier.t)|`Lookup_failureTm->Format.fprintffmt"Lookup failure (type): %a"(model_identifierc)(m:>Odoc_model.Paths.Identifier.t)|`Lookup_failureVm->Format.fprintffmt"Lookup failure (value): %a"(model_identifierc)(m:>Odoc_model.Paths.Identifier.t)|`ApplyNotFunctor->Format.fprintffmt"Apply module is not a functor"|`Class_replaced->Format.fprintffmt"Class replaced"|`Parentp->ppfmt(p:>any)|`Parent_sige->Format.fprintffmt"Parent_sig: %a"pp(e:>any)|`Parent_module_typee->Format.fprintffmt"Parent_module_type: %a"pp(e:>any)|`Parent_expre->Format.fprintffmt"Parent_expr: %a"pp(e:>any)|`Parent_modulee->Format.fprintffmt"Parent_module: %a"pp(e:>any)|`Fragment_root->Format.fprintffmt"Fragment root"|`Parent_typee->Format.fprintffmt"Parent_type: %a"pp(e:>any)|`Referencee->pp_reference_lookup_errorfmteandpp_reference_lookup_errorfmt=function|`Wrong_kind(expected,got)->letpp_sepfmt()=Format.fprintffmt" or "inFormat.fprintffmt"is of kind %a but expected %a"pp_reference_kindgot(Format.pp_print_list~pp_seppp_reference_kind)expected|`Lookup_by_name(kind,name)|`Find_by_name(kind,name)->(matchkindwith|`Any->Format.fprintffmt"Couldn't find %S"name|#reference_kindaskind->Format.fprintffmt"Couldn't find %a %S"pp_reference_kindkindname)|`Path_error(err,tag,path)->pp_path_errorfmterrtagpath|`Parente->ppfmt(e:>any)endtypekind=[`OpaqueModule|`Rootofstring]letreckind_of_module_cpath=function|`Rootname->Some(`Root(ModuleName.to_stringname))|`Substitutedp'|`Dot(p',_)->kind_of_module_cpathp'|`Apply(a,b)->(matchkind_of_module_cpathawith|Some_asa->a|None->kind_of_module_cpathb)|_->Noneletreckind_of_module_type_cpath=function|`Substitutedp'->kind_of_module_type_cpathp'|`DotMT(p',_)->kind_of_module_cpathp'|_->None(** [Some (`Root _)] for errors during lookup of root modules or [None] for
other errors. *)letreckind_of_error:Tools_error.any->kindoption=function|`UnresolvedPath(`Module(cp,e))->(matchkind_of_module_cpathcpwith|None->kind_of_error(e:>Tools_error.any)|x->x)|`UnresolvedPath(`ModuleType(cp,e))->(matchkind_of_module_type_cpathcpwith|None->kind_of_error(e:>Tools_error.any)|x->x)|`Lookup_failure{iv=`Root(_,name);_}->Some(`Root(ModuleName.to_stringname))|`Lookup_failure_rootname->Some(`Root(ModuleName.to_stringname))|`Parent(`Parent_sige)->kind_of_error(e:>Tools_error.any)|`Parent(`Parent_module_typee)->kind_of_error(e:>Tools_error.any)|`Parent(`Parent_expre)->kind_of_error(e:>Tools_error.any)|`Parent(`Parent_modulee)->kind_of_error(e:>Tools_error.any)|`Parent(`Parent_ase)->kind_of_error(e:>Tools_error.any)|`OpaqueModule->(* Don't turn OpaqueModule warnings into errors *)Some`OpaqueModule|_->Noneandkind_of_type_of_desc:Component.ModuleType.type_of_desc->kindoption=function|ModPathcp->kind_of_module_cpathcp|StructIncludecp->kind_of_module_cpathcpletkind_of_error~what=function|Somee->kind_of_error(e:>Tools_error.any)|None->(matchwhatwith|`Include(Component.Include.Aliascp)->kind_of_module_cpathcp|`Module{Odoc_model.Paths.Identifier.iv=`Root(_,name);_}->Some(`Root(ModuleName.to_stringname))|_->None)openPathstypewhat=[`Functor_parameterofIdentifier.FunctorParameter.t|`ValueofIdentifier.Value.t|`Value_pathofCpath.value|`ClassofIdentifier.Class.t|`Class_typeofIdentifier.ClassType.t|`ModuleofIdentifier.Module.t|`Module_typeofIdentifier.Signature.t|`Module_pathofCpath.module_|`Module_type_pathofCpath.module_type|`Module_type_UofComponent.ModuleType.U.expr|`IncludeofComponent.Include.decl|`PackageofCpath.module_type|`TypeofCfrag.type_|`Type_pathofCpath.type_|`Class_type_pathofCpath.class_type|`With_moduleofCfrag.module_|`With_module_typeofCfrag.module_type|`With_typeofCfrag.type_|`Module_type_exprofComponent.ModuleType.expr|`Module_type_u_exprofComponent.ModuleType.U.expr|`Child_moduleofstring|`Child_pageofstring|`ReferenceofReference.t]letreport~(what:what)?tools_erroraction=letaction=matchactionwith|`Lookup->"lookup"|`Expand->"compile expansion for"|`Resolve_module_type->"resolve type of"|`Resolve->"resolve"|`Compile->"compile"inletpp_tools_errorfmt=function|Somee->Format.fprintffmt" %a"Tools_error.pp(e:>Tools_error.any)|None->()inletopenComponent.Fmtinletreport_error()=letrsubjectpp_aa=Lookup_failures.report_warning"Failed to %s %s %a%a"actionsubjectpp_aapp_tools_errortools_errorinletc=defaultinletfmt_idfmtid=model_identifiercfmt(id:>Paths.Identifier.t)inmatchwhatwith|`Functor_parameterid->r"functor parameter"fmt_idid|`Valueid->r"value"fmt_idid|`Classid->r"class"fmt_idid|`Class_typeid->r"class type"fmt_idid|`Moduleid->r"module"fmt_idid|`Module_typeid->r"module type"fmt_idid|`Module_pathpath->r"module path"(module_pathc)path|`Module_type_pathpath->r"module type path"(module_type_pathc)path|`Module_type_Uexpr->r"module type expr"(u_module_type_exprc)expr|`Includedecl->r"include"(include_declc)decl|`Packagepath->r"module package"(module_type_pathc)(path:>Cpath.module_type)|`Typecfrag->r"type"(type_fragmentc)cfrag|`Type_pathpath->r"type"(type_pathc)path|`Value_pathpath->r"value"(value_pathc)path|`Class_type_pathpath->r"class_type"(class_type_pathc)path|`With_modulefrag->r"module substitution"(module_fragmentc)frag|`With_module_typefrag->r"module type substitution"(module_type_fragmentc)frag|`With_typefrag->r"type substitution"(type_fragmentc)frag|`Module_type_exprcexpr->r"module type expression"(module_type_exprc)cexpr|`Module_type_u_exprcexpr->r"module type u expression"(u_module_type_exprc)cexpr|`Child_modulerf->r"child module"Astring.String.pprf|`Child_pagerf->r"child page"Astring.String.pprf|`Referenceref->r"reference"(model_referencec)refinmatchkind_of_error~whattools_errorwith|Some(`Rootname)->Lookup_failures.report_root~name|Some`OpaqueModule|None->report_error()