1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798991001011021031041051061071081091101111121131141151161171181191201211221231241251261271281291301311321331341351361371381391401411421431441451461471481491501511521531541551561571581591601611621631641651661671681691701711721731741751761771781791801811821831841851861871881891901911921931941951961971981992002012022032042052062072082092102112122132142152162172182192202212222232242252262272282292302312322332342352362372382392402412422432442452462472482492502512522532542552562572582592602612622632642652662672682692702712722732742752762772782792802812822832842852862872882892902912922932942952962972982993003013023033043053063073083093103113123133143153163173183193203213223233243253263273283293303313323333343353363373383393403413423433443453463473483493503513523533543553563573583593603613623633643653663673683693703713723733743753763773783793803813823833843853863873883893903913923933943953963973983994004014024034044054064074084094104114124134144154164174184194204214224234244254264274284294304314324334344354364374384394404414424434444454464474484494504514524534544554564574584594604614624634644654664674684694704714724734744754764774784794804814824834844854864874884894904914924934944954964974984995005015025035045055065075085095105115125135145155165175185195205215225235245255265275285295305315325335345355365375385395405415425435445455465475485495505515525535545555565575585595605615625635645655665675685695705715725735745755765775785795805815825835845855865875885895905915925935945955965975985996006016026036046056066076086096106116126136146156166176186196206216226236246256266276286296306316326336346356366376386396406416426436446456466476486496506516526536546556566576586596606616626636646656666676686696706716726736746756766776786796806816826836846856866876886896906916926936946956966976986997007017027037047057067077087097107117127137147157167177187197207217227237247257267277287297307317327337347357367377387397407417427437447457467477487497507517527537547557567577587597607617627637647657667677687697707717727737747757767777787797807817827837847857867877887897907917927937947957967977987998008018028038048058068078088098108118128138148158168178188198208218228238248258268278288298308318328338348358368378388398408418428438448458468478488498508518528538548558568578588598608618628638648658668678688698708718728738748758768778788798808818828838848858868878888898908918928938948958968978988999009019029039049059069079089099109119129139149159169179189199209219229239249259269279289299309319329339349359369379389399409419429439449459469479489499509519529539549559569579589599609619629639649659669679689699709719729739749759769779789799809819829839849859869879889899909919929939949959969979989991000100110021003openBrowse_rawopenStdtypesyntax_info=Query_protocol.Syntax_doc_result.toptionmoduleDoc_website_base=structtypet=Ocaml|Oxcamlendletsyntax_doc_url(doc_website_base:Doc_website_base.t)endpoint=letbase_url=matchdoc_website_basewith|Ocaml->"https://ocaml.org/manual/5.2/"|Oxcaml->"https://oxcaml.org/documentation/"inSome(base_url^endpoint)(** Drop elements from the head of [list] until [f] returns [true]. *)letrecdrop_untillist~f=matchlistwith|[]->[]|hd::rest->(matchfhdwith|true->list|false->drop_untilrest~f)moduleLoc_comparison_result=structtypet=Before|Inside|After|Ghostletis_inside=function|Before|After|Ghost->false|Inside->trueendletget_jkind_abbrev_doc(abbrev:Longident.t)=letopenOption.Infixinletopenstructtypedocpage=Kind_syntax|Unboxed_typesendinlet*description,docpage=matchabbrevwith|Lident"any"->Some("The top of the kind lattice; all types have this kind.",Kind_syntax)|Lident"any_non_null"->Some("A synonym for `any mod non_null`.",Kind_syntax)|Lident"value_or_null"->Some("The kind of ordinary OCaml types, but with the possibility that the \
type contains `null`.",Kind_syntax)|Lident"value"->Some("The kind of ordinary OCaml types",Kind_syntax)|Lident"void"->Some("The layout of types that are represented by 0 bits at runtime; \
these types can contain only 1 value.",Kind_syntax)|Lident"immediate64"->Some("On 64-bit platforms, the kind of types inhabited only by tagged \
integers.",Kind_syntax)|Lident"immediate"->Some("The kind of types inhabited only by tagged integers.",Kind_syntax)|Lident"immediate_or_null"->Some("The kind of types inhabited by tagged integers and the bit pattern \
containing all 0s.",Kind_syntax)|Lident"float64"->Some("The layout of types represented by a 64-bit machine float.",Unboxed_types)|Lident"float32"->Some("The layout of types represented by a 32-bit machine float.",Unboxed_types)|Lident"word"->Some("The layout of types represented by a native-width machine word.",Unboxed_types)|Lident"bits8"->Some("The layout of types represented by an 8-bit machine word.",Unboxed_types)|Lident"bits16"->Some("The layout of types represented by a 16-bit machine word.",Unboxed_types)|Lident"bits32"->Some("The layout of types represented by a 32-bit machine word.",Unboxed_types)|Lident"bits64"->Some("The layout of types represented by a 64-bit machine word.",Unboxed_types)|Lident"vec128"->Some("The layout of types represented by a 128-bit machine vector.",Unboxed_types)|Lident"vec256"->Some("The layout of types represented by a 256-bit machine vector.",Unboxed_types)|Lident"vec512"->Some("The layout of types represented by a 512-bit machine vector.",Unboxed_types)|Lident"immutable_data"->Some("The kind of types that contain no mutable parts and no functions.",Kind_syntax)|Lident"sync_data"->Some("The kind of types that contain no mutable parts (except possibly \
for atomic fields) and no functions.",Kind_syntax)|Lident"mutable_data"->Some("The kind of types that may have mutable parts but contain no \
functions.",Kind_syntax)|_->Noneinletdocpage_str=matchdocpagewith|Kind_syntax->"kinds/syntax/"|Unboxed_types->"unboxed-types/intro/"in(Some{name="Kind abbreviation";description;documentation=syntax_doc_urlOxcamldocpage_str;level=Advanced}:syntax_info)letget_mod_bound_docmod_bound=letopenOption.Infixinletopenstructtypeparse_result=|Axis_pair:'aJkind_axis.Axis.t*'a->parse_result|Everythingendinlet*parsed=matchTypemode.Modifier_axis_pair.of_stringmod_boundwith|exceptionNot_found->(matchmod_boundwith|"everything"->SomeEverything|__->None)|P(axis,bound)->Some(Axis_pair(axis,bound))inlet*description=matchparsedwith|Axis_pair(Modal(Comonadic_),_)->Some(Format.asprintf"Values of types of this kind can cross to `%s` from weaker modes."mod_bound)|Axis_pair(Modal(Monadic_),_)->Some(Format.asprintf"Values of types of this kind can cross from `%s` to stronger modes"mod_bound)|Axis_pair(NonmodalExternality,Internal)->Some"Values of types of this kind might be pointers to the OCaml heap"|Axis_pair(NonmodalExternality,External64)->Some"On 64-bit systems, values of types of this kind are never pointers to \
the OCaml heap"|Axis_pair(NonmodalExternality,External)->Some"Values of types of this kind are never pointers to the OCaml heap"|Axis_pair(NonmodalNullability,Maybe_null)->Some"Values of types of this kind might be the bit pattern containing all \
0s"|Axis_pair(NonmodalNullability,Non_null)->Some"Values of types of this kind that are also a subkind of `value` are \
never the bit pattern containing all 0s"|Axis_pair(NonmodalSeparability,Non_float)->Some"Values of types of this kind are never pointers to floats."|Axis_pair(NonmodalSeparability,Separable)->Some"No type of this kind includes both pointers to a float and other \
values."|Axis_pair(NonmodalSeparability,Maybe_separable)->Some"Types of this kind may mix pointers to floats with other values."|Everything->Some"Synonym for \"global aliased many contended portable unyielding \
immutable stateless external_\", convenient for describing \
immediates."in(Some{name="Mod-bound";description;documentation=syntax_doc_urlOxcaml"kinds/intro/";level=Advanced}:syntax_info)letget_mode_doc(Atom(axis,mode):Mode.Alloc.atom)=letopenOption.Infixinlet*description=match(axis,mode)with|ComonadicAreality,Local->Some"Values with this mode cannot escape the current region"|ComonadicAreality,Global->Some"Values with this mode can escape any region"|MonadicContention,Contended->Some"The mutable parts of values with this mode cannot be accessed (unless \
they are atomic)"|MonadicContention,Shared->Some"The mutable parts of values with this mode can be read, but not \
written (unless they are atomic)"|MonadicContention,Uncontended->Some"The mutable parts of values with this mode can be fully accessed"|ComonadicPortability,Nonportable->Some"Values with this mode cannot be sent to or shared with other threads, \
in order to avoid data races."|ComonadicPortability,Shareable->Some"Values with this mode can be shared with (but not sent to) other \
threads without causing data races"|ComonadicPortability,Portable->Some"Values with this mode can be sent to other threads without causing \
data races"|MonadicUniqueness,Aliased->Some"There may be multiple pointers to values with this mode"|MonadicUniqueness,Unique->Some"It is guaranteed that there is only one pointer to values with this \
mode"|ComonadicLinearity,Once->Some"Functions with this mode can only be called once"|ComonadicLinearity,Many->Some"Functions with this mode can be called any number of times"|ComonadicYielding,Yielding->Some"Functions with this mode can jump to effect handlers"|ComonadicYielding,Unyielding->Some"Functions within this value will never jump to an effect handler"|MonadicVisibility,Immutable->Some"The mutable parts of values with this mode cannot be accessed"|MonadicVisibility,Read->Some"The mutable parts of values with this mode can be read, but not \
written"|MonadicVisibility,Read_write->Some"The mutable parts of values with this mode can be fully accessed"|ComonadicStatefulness,Stateful->Some"Functions with this mode can read and write mutable data"|ComonadicStatefulness,Observing->Some"Functions with this mode can read but not write mutable data"|ComonadicStatefulness,Stateless->Some"Functions with this mode cannot access mutable data"|ComonadicForkable,Forkable->Some"Functions with this mode may be executed concurrently."|ComonadicForkable,Unforkable->Some"Functions with this mode cannot be executed concurrently."|MonadicStaticity,Static->Some"The value is known at compile-time."|MonadicStaticity,Dynamic->Some"The value is not known at compile-time."inletdoc_url=letsubpage=matchaxiswith|ComonadicAreality->"stack-allocation/intro/"|MonadicContention->"parallelism/01-intro/"|ComonadicPortability->"parallelism/01-intro/"|MonadicUniqueness->"uniqueness/intro/"|ComonadicLinearity->"uniqueness/intro/"|ComonadicYielding->"modes/intro/"|MonadicVisibility->"modes/intro/"|ComonadicStatefulness->"modes/intro/"|ComonadicForkable->"modes/intro/"|MonadicStaticity->"modes/intro/"insyntax_doc_urlOxcamlsubpagein(Some{name="Mode";description;documentation=doc_url;level=Advanced}:syntax_info)letget_modality_doc(Atom(axis,modality):Mode.Modality.atom)=letdescription=(* CR-someday: Detect the context that the modality is within to make this message
more detailed. Ex: "This field is always stronger than _, even if the record has a
weaker mode." *)matchaxiswith|Comonadic_->Format_doc.asprintf"The annotated value's mode is always at least as strong as `%a`, even \
if its container's mode is weaker."(Mode.Modality.Per_axis.printaxis)modality|Monadic_->Format_doc.asprintf"The annotated value's mode is always at least as weak as `%a`, even \
if its container's mode is a stronger."(Mode.Modality.Per_axis.printaxis)modalityin(Some{name="Modality";description;documentation=syntax_doc_urlOxcaml"modes/syntax/";level=Advanced}:syntax_info)letget_oxcaml_syntax_doccursor_locnodes:syntax_info=(* Merlin-jst specific: This function gets documentation for oxcaml language
extensions. *)letcompare_cursor_to_loc(loc:Location.t):Loc_comparison_result.t=matchloc.loc_ghostwith|true->Ghost|false->(matchLocation_aux.compare_poscursor_loclocwith|nwhenn<0->Before|nwhenn>0->After|_->Inside)inletnodes=List.mapnodes~f:sndinletnodes=(* Sometimes the bottom node of [nodes] doesn't include the location of the cursor.
This seems to be because Merlin will find the bottom-most node that contains the
cursor, but then select a child of that node via some heuristics. This is in order
to try to find a node with the environment the user most likely wanted if they,
say, have their cursor on a keyword that isn't represented by a node type in
[Browse_raw.t] (see docstring on [Mtyper.node_at] for more info). But here we
actually want the cursor to be included within all the nodes in [nodes] so that we
can more easily reason about [nodes]. So we drop nodes from the head of [nodes]
until we reach one that includes the cursor. *)drop_untilnodes~f:(funnode->letloc=Browse_raw.node_merlin_locLocation.nonenodeinLoc_comparison_result.is_inside(compare_cursor_to_locloc))inletstack_allocation_url=syntax_doc_urlOxcaml"stack-allocation/reference/"inletget_doc_for_attribute(attribute:Parsetree.attribute):syntax_info=letbuiltin_attrs_doc_url=syntax_doc_urlOcaml"attributes.html#ss:builtin-attributes"in(* See below usage of this function for explanation of why this isn't part of the
other big match statement. *)matchattributewith(* Zero-alloc annotations *)|{attr_name={txt="zero_alloc";_};attr_payload;_}->(letdoc_url=syntax_doc_urlOxcaml"miscellaneous-extensions/zero_alloc_check/"inmatchattr_payloadwith|PStr[]->Some{name="Zero-alloc annotation";description="This function does not allocate on the OCaml heap on executions \
that return normally. The function may allocate if it raises an \
exception.";documentation=doc_url;level=Advanced}|PStr[{pstr_desc=Pstr_eval({pexp_desc=(Pexp_ident{txt=Lidentzero_alloc_flag_name;_}|Pexp_apply({pexp_desc=Pexp_ident{txt=Lidentzero_alloc_flag_name;_};_},_));_},_);_}]->(matchzero_alloc_flag_namewith|"opt"->Some{name="Zero-alloc opt annotation";description="Same as [@zero_alloc], but checks during optimized builds \
only.";documentation=doc_url;level=Advanced}|"assume"->Some{name="Zero-alloc assume annotation";description="This function is assumed to be zero-alloc, but the compiler \
does not guarantee it.";documentation=doc_url;level=Advanced}|"assume_unless_opt"->Some{name="Zero-alloc assume_unless_opt annotation";description="Same as [@zero_alloc opt] in optimized builds. Same as \
[@zero_alloc assume] in non-optimized builds.";documentation=doc_url;level=Advanced}|"strict"->Some{name="Zero-alloc strict annotation";description="This function does not allocate on the OCaml heap (both \
normal and exceptional returns).";documentation=doc_url;level=Advanced}|"arity"->Some{name="Zero-alloc arity annotation";description="The function does not allocate when applied to [n] arguments. \
This can be used to override the arity inferred based on the \
number of arrows in the type.";documentation=doc_url;level=Advanced}|_->None)|_->Some{name="Unrecognized zero-alloc annotation";description="This is an unrecognized zero-alloc annotation.";documentation=doc_url;level=Advanced})|{attr_name={txt="noalloc";_};_}->Some{name="Noalloc annotation";description="This external does not allocate, does not raise exceptions, and \
does not release the domain lock. The compiler will optimize uses \
to a direct C call.";documentation=syntax_doc_urlOcaml"intfc.html#ss:c-direct-call";level=Advanced}(* Inlining annotations *)|{attr_name={txt="inline";_};attr_payload;_}->(letinline_always_annot:syntax_info=Some{name="Inline always annotation";description="On a function declaration, causes the function to be inlined at \
all known call sites (can be overridden by [@inlined]). In \
addition it will be made available for inlining in other source \
files (with appropriate build settings permitting .cmx file \
visibility)";documentation=builtin_attrs_doc_url;level=Advanced}inmatchattr_payloadwith|PStr[]->inline_always_annot|PStr[{pstr_desc=Pstr_eval({pexp_desc=Pexp_ident{txt=Lidentinline_flag_name;_};_},_);_}]->(matchinline_flag_namewith|"always"->inline_always_annot|"never"->Some{name="Inline never annotation";description="This function will not be inlined. In this file (only), this \
can be overridden at call sites with [@inlined].";documentation=builtin_attrs_doc_url;level=Advanced}|"available"->Some{name="Inline available annotation";description="Causes the function to be available for inlining in other \
source files, but does not affect actual inlining decisions. \
Can be used to ensure cross-source-file inlining even in \
cases where it would normally be unavailable e.g. a very \
large function";documentation=None;level=Advanced}|_->None)|_->Some{name="Unrecognized inline annotation";description="Unrecognized inline annoation";documentation=builtin_attrs_doc_url;level=Advanced})|{attr_name={txt="inlined";_};attr_payload;_}->(letinlined_always_annot:syntax_info=Some{name="Inlined always annotation";description="If possible, this function call will be inlined. The function \
must be known to the optimizer (i.e. not an indirect call; and \
if in another source file, the .cmx for that file must be \
available and the function available for inlining e.g. by \
[@inline always] or [@inline available] or the decision of the \
optimizer). This attribute can override [@inline never] but \
only within the same source file.";documentation=builtin_attrs_doc_url;level=Advanced}inmatchattr_payloadwith|PStr[]->inlined_always_annot|PStr[{pstr_desc=Pstr_eval({pexp_desc=Pexp_ident{txt=Lidentinline_flag_name;_};_},_);_}]->(matchinline_flag_namewith|"always"->inlined_always_annot|"never"->Some{name="Inlined never annotation";description="This function call will not be inlined, overriding any \
attribute on the function's declaration.";documentation=builtin_attrs_doc_url;level=Advanced}|"hint"->Some{name="Inlined hint annotation";description="If possible, this function call will be inlined, like \
[@inlined always]. However, no warning is emitted when \
inlining is not possible.";documentation=None;level=Advanced}|_->None)|_->Some{name="Unrecognized inlined annotation";description="Unrecognized inlined annotation";documentation=builtin_attrs_doc_url;level=Advanced})|{attr_name={txt="loop";_};attr_payload;_}->(letloop_always_desc:syntax_info=Some{name="Loop always annotation";description="Forces the self-tail-recursive call sites, if any, in the given \
function to be converted into a loop. If those are the only \
uses of the recursively-defined function variable, no closure \
will be generated, and the function can then be inlined as a \
loop. This transformation is not yet supported for \
mutually-recursive functions.";documentation=None;level=Advanced}inmatchattr_payloadwith|PStr[]->loop_always_desc|PStr[{pstr_desc=Pstr_eval({pexp_desc=Pexp_ident{txt=Lidentloop_flag_name;_};_},_);_}]->(matchloop_flag_namewith|"always"->loop_always_desc|"never"->Some{name="Loop never annotation";description="Prevents the given function from being turned into a loop.";documentation=None;level=Advanced}|_->None)|_->Some{name="Unrecognized loop annotation";description="Unrecognized loop annotation";documentation=None;level=Advanced})|{attr_name={txt="unrolled";_};_}->Some{name="unrolled annotation";description="On a recursive function's call site, causes the function body to \
be unrolled this many times. At present this is not supported if \
the function was loopified (use [@loop never] to disable). If in \
another source file, the function must be available for inlining \
e.g. by [@inline available] with the .cmx file available.";documentation=builtin_attrs_doc_url;level=Advanced}(* Misc *)|{attr_name={txt="nontail";_};_}->Some{name="nontail annotation";description="This function call will be called normally (with a fresh stack \
frame), despite appearing in tail position";documentation=stack_allocation_url;level=Advanced}|_->Noneinmatchnodeswith(* Modes and modalities *)|Mode{txt=mode;_}::_->get_mode_docmode|Modality{txt=modality;_}::ancestors->(matchancestorswith|Jkind_annotation_::_->(* CR-someday: Provide separate documatation for modalities within a jkind *)get_modality_docmodality|_->get_modality_docmodality)(* Jkinds *)|Mod_bound{txt=Modemod_bound;_}::_->get_mod_bound_docmod_bound|Jkind_annotation{pjka_desc=Pjk_abbreviationabbrev;_}::_->(* CR-someday: It isn't ideal that this is based on the parsetree, as this will result
in an incorrect hint in the presence of shadowing. To properly fix, the compiler
should introduce a typed jkind into the typedtree. Internal ticket 6600. *)get_jkind_abbrev_docabbrev.txt|Jkind_annotation{pjka_desc=Pjk_mod_;_}::_->Some{name="`mod` keyword (in a kind)";description="Types of this kind will cross the following modes";documentation=syntax_doc_urlOxcaml"kinds/intro/";level=Advanced}|Jkind_annotation{pjka_desc=Pjk_with(_,with_type,_);_}::_->(matchcompare_cursor_to_locwith_type.ptyp_locwith|Before->Some{name="`with` keyword (in a kind)";description="Mark a type as structurally included within another; if the \
with-type does not cross a certain mode, neither does its \
containing type";documentation=syntax_doc_urlOxcaml"kinds/intro/";level=Advanced}|Inside->Some{name="with-type";description="Mark a type as structurally included within another; if the \
with-type does not cross a certain mode, neither does its \
containing type";documentation=syntax_doc_urlOxcaml"kinds/intro/";level=Advanced}|After->Some{name="`@@` keyword (in a kind)";description="Mark a type as included under a modality";documentation=syntax_doc_urlOxcaml"kinds/intro/";level=Advanced}|Ghost->None)(* Module Strengthening *)|Module_type{mty_desc=Tmty_strengthen(_,_,mod_ident);_}::_->((* Due to a current bug, there is no node for the module name after the `with`, so
it's possible the cursor is on that instead of the `with`. *)matchcompare_cursor_to_locmod_ident.locwith|Before->Some{name="Module strengthening";description="Mark each type in this module type as equal to the corresponding \
type in the given module";documentation=syntax_doc_urlOxcaml"miscellaneous-extensions/module-strengthening/";level=Advanced}|Inside|After|Ghost->None)(* Local allocations *)|Expression{exp_desc=Texp_exclave_;_}::_->Some{name="exclave_";description="End the current region; the following code allocates in the outer \
region";documentation=stack_allocation_url;level=Advanced}|Expression{exp_extra;exp_loc;_}::_whenList.existsexp_extra~f:(fun(extra,_,_)->matchextrawith|Typedtree.Texp_stack->true|_->false)&&(* In this case, [exp_loc] differs from the location returned by
[Browse_raw.node_merlin_loc] (which is whats used to determine [nodes]).
The [Browse_raw.node_merlin_loc] one includes the stack_, whereas [exp_loc]
doesn't. Since we already know that the cursor is in the
[Browse_raw.node_merlin_loc] location (see the usage of [drop_until]
above), we just need to check whether its in [exp_loc] to know whether it's
on the [stack_] keyword. *)not(Loc_comparison_result.is_inside(compare_cursor_to_locexp_loc))->Some{name="stack_";description="Force the following allocation to be on stack.";documentation=stack_allocation_url;level=Advanced}(* Include functor *)|(Include_description{incl_kind=Tincl_functor_|Tincl_gen_functor_;_}|Include_declaration{incl_kind=Tincl_functor_|Tincl_gen_functor_;_})::_->Some{name="include functor";description="Apply the functor to the current structure up to this point, and \
include the result in the current structure";documentation=syntax_doc_urlOxcaml"miscellaneous-extensions/include-functor/";level=Advanced}|nodes->(* The locations of attributes nodes only include the attribute name, not the payload.
Additionally, the attribute node is not a parent of the payload node. But the
attribute node will be a sibling of the payload. (Note that the bottom node might
not be the payload but a node within the payload). So here we walk up the list of
ancestors until we find one with an attribute as a child whose location includes
the cursor position, at which point we can conclude the cursor is in the payload. *)List.find_map_optnodes~f:(funancestor->letchildren=Browse_raw.fold_node(fun_childacc->child::acc)Env.emptyancestor[]inList.find_map_optchildren~f:(funchild->matchchildwith|Attributeattribute->(matchcompare_cursor_to_locattribute.attr_locwith|Inside->get_doc_for_attributeattribute|Before|After|Ghost->None)|_->None))letget_syntax_doccursor_locnode:syntax_info=letsyntax_doc_url=syntax_doc_urlOcamlinmatchnodewith|(_,Type_kind_)::(_,Type_declaration_)::(_,With_constraint(Twith_typesubst_))::_->Some{name="Destructive substitution";description="Behaves like normal signature constraints but removes the redefined \
type or module from the signature.";documentation=syntax_doc_url"signaturesubstitution.html#ss:destructive-substitution";level=Simple}|(_,Type_kind_)::(_,Type_declaration_)::(_,Signature_item({sig_desc=Tsig_typesubst_;_},_))::_->Some{name="Local substitution";description="Behaves like destructive substitution but is introduced during the \
specification of the signature, and will apply to all the items \
that follow.";documentation=syntax_doc_url"signaturesubstitution.html#ss:local-substitution";level=Simple}|(_,Module_type_)::(_,Module_type_)::(_,Module_type_constraint(Tmodtype_explicit({mty_desc=Tmty_with(_,[(_,_,Twith_modtype_)]);_},_)))::_->Some{name="Module substitution";description="Behaves like type substitutions but are useful to refine an \
abstract module type in a signature into a concrete module type,";documentation=syntax_doc_url"signaturesubstitution.html#ss:module-type-substitution";level=Simple}|(_,Type_kindTtype_open)::(_,Type_declaration{typ_private;_})::_->lete_name="Extensible Variant Type"inlete_description="Can be extended with new variant constructors using `+=`."inlete_url="extensiblevariants.html"inletname,description,url=matchtyp_privatewith|Public->(e_name,e_description,e_url)|Private->(Format.sprintf"Private %s"e_name,Format.sprintf"%s. Prevents new constructors from being declared directly, but \
allows extension constructors to be referred to in interfaces."e_description,"extensiblevariants.html#ss:private-extensible")inSome{name;description;documentation=syntax_doc_urlurl;level=Advanced}|(_,Constructor_declaration_)::(_,Type_kind(Ttype_variant_))::(_,Type_declaration{typ_private;_})::_|_::(_,Constructor_declaration_)::(_,Type_kind(Ttype_variant_))::(_,Type_declaration{typ_private;_})::_->letv_name="Variant Type"inletv_description="Represent's data that may take on multiple different forms."inletv_url="typedecl.html#ss:typedefs"inletname,description,url=matchtyp_privatewith|Public->(v_name,v_description,v_url)|Private->(Format.sprintf"Private %s"v_name,Format.sprintf"%s This type is private, values cannot be constructed directly \
but can be de-structured as usual."v_description,"privatetypes.html#ss:private-types-variant")inSome{name;description;documentation=syntax_doc_urlurl;level=Simple}|(_,Core_type_)::(_,Core_type_)::(_,Label_declaration_)::(_,Type_kind(Ttype_record_))::(_,Type_declaration{typ_private;_})::_->letr_name="Record Type"inletr_description="Defines variants with a fixed set of fields"inletr_url="typedecl.html#ss:typedefs"inletname,description,url=matchtyp_privatewith|Public->(r_name,r_description,r_url)|Private->(Format.sprintf"Private %s"r_name,Format.sprintf"%s This type is private, values cannot be constructed directly \
but can be de-structured as usual."r_description,"privatetypes.html#ss:private-types-variant")inSome{name;description;documentation=syntax_doc_urlurl;level=Simple}|(_,Type_kind(Ttype_variant_))::(_,Type_declaration{typ_private=Public;_})::_->Some{name="Empty Variant Type";description="An empty variant type.";documentation=syntax_doc_url"emptyvariants.html";level=Advanced}|(_,Type_kindTtype_abstract)::(_,Type_declaration{typ_private=Public;typ_manifest=None;_})::_->Some{name="Abstract Type";description="Define variants with arbitrary data structures, including other \
variants, records, and functions";documentation=syntax_doc_url"typedecl.html#ss:typedefs";level=Simple}|(_,Type_kindTtype_abstract)::(_,Type_declaration{typ_private=Private;_})::_->Some{name="Private Type Abbreviation";description="Declares a type that is distinct from its implementation type \
`typexpr`.";documentation=syntax_doc_url"privatetypes.html#ss:private-types-abbrev";level=Simple}|(_,Expression_)::(_,Expression_)::(_,Value_binding_)::(_,Structure_item({str_desc=Tstr_value(Recursive,_);_},_))::_->Some{name="Recursive value definition";description="Supports a certain class of recursive definitions of non-functional \
values.";documentation=syntax_doc_url"letrecvalues.html";level=Simple}|(_,Module_expr_)::(_,Module_type{mty_desc=Tmty_typeof_;_})::_->Some{name="Recovering module type";description="Expands to the module type (signature or functor type) inferred for \
the module expression `module-expr`. ";documentation=syntax_doc_url"moduletypeof.html";level=Simple}|(_,Module_expr_)::(_,Module_expr_)::(_,Module_binding_)::(_,Structure_item({str_desc=Tstr_recmodule_;_},_))::_->Some{name="Recursive module";description="A simultaneous definition of modules that can refer recursively to \
each others.";documentation=syntax_doc_url"recursivemodules.html";level=Simple}|(_,Expression_)::(_,Expression_)::(_,Expression_)::(_,Value_binding{vb_expr={exp_extra=[(Texp_newtype(_,loc,_,_),_,_)];exp_loc;_};_})::_->(letin_range=cursor_loc.Lexing.pos_cnum-1>exp_loc.loc_start.pos_cnum&&cursor_loc.Lexing.pos_cnum<=loc.loc.loc_end.pos_cnum+1inmatchin_rangewith|true->Some{name="Locally Abstract Type";description="Type constructor which is considered abstract in the scope of the \
sub-expression and replaced by a fresh type variable.";documentation=syntax_doc_url"locallyabstract.html";level=Simple}|false->None)|(_,Module_expr_)::(_,Module_expr_)::(_,Expression{exp_desc=Texp_pack_;_})::_->Some{name="First class module";description="Converts a module (structure or functor) to a value of the core \
language that encapsulates the module.";documentation=syntax_doc_url"firstclassmodules.html";level=Simple}|_->get_oxcaml_syntax_doccursor_locnode