mirror of
https://github.com/c-cube/moonpool.git
synced 2025-12-18 08:36:43 -05:00
40 lines
23 KiB
HTML
40 lines
23 KiB
HTML
<!DOCTYPE html>
|
||
<html xmlns="http://www.w3.org/1999/xhtml"><head><title>Typemod (ocaml.Typemod)</title><meta charset="utf-8"/><link rel="stylesheet" href="../../_odoc-theme/odoc.css"/><meta name="generator" content="odoc 2.4.2"/><meta name="viewport" content="width=device-width,initial-scale=1.0"/><script src="../../highlight.pack.js"></script><script>hljs.initHighlightingOnLoad();</script></head><body class="odoc"><nav class="odoc-nav"><a href="../index.html">Up</a> – <a href="../index.html">ocaml</a> » Typemod</nav><header class="odoc-preamble"><h1>Module <code><span>Typemod</span></code></h1><p>Type-checking of the module language and typed ast hooks</p><p><b>Warning:</b> this module is unstable and part of <span class="xref-unresolved" title="Compiler_libs">compiler-libs</span>.</p></header><div class="odoc-content"><div class="odoc-spec"><div class="spec module anchored" id="module-Signature_names"><a href="#module-Signature_names" class="anchor"></a><code><span><span class="keyword">module</span> <a href="Signature_names/index.html">Signature_names</a></span><span> : <span class="keyword">sig</span> ... <span class="keyword">end</span></span></code></div></div><div class="odoc-spec"><div class="spec value anchored" id="val-type_module"><a href="#val-type_module" class="anchor"></a><code><span><span class="keyword">val</span> type_module :
|
||
<span><a href="../Env/index.html#type-t">Env.t</a> <span class="arrow">-></span></span>
|
||
<span><a href="../Parsetree/index.html#type-module_expr">Parsetree.module_expr</a> <span class="arrow">-></span></span>
|
||
<a href="../Typedtree/index.html#type-module_expr">Typedtree.module_expr</a> * <a href="../Shape/index.html#type-t">Shape.t</a></span></code></div></div><div class="odoc-spec"><div class="spec value anchored" id="val-type_structure"><a href="#val-type_structure" class="anchor"></a><code><span><span class="keyword">val</span> type_structure :
|
||
<span><a href="../Env/index.html#type-t">Env.t</a> <span class="arrow">-></span></span>
|
||
<span><a href="../Parsetree/index.html#type-structure">Parsetree.structure</a> <span class="arrow">-></span></span>
|
||
<a href="../Typedtree/index.html#type-structure">Typedtree.structure</a> * <a href="../Types/index.html#type-signature">Types.signature</a> * <a href="Signature_names/index.html#type-t">Signature_names.t</a> * <a href="../Shape/index.html#type-t">Shape.t</a> * <a href="../Env/index.html#type-t">Env.t</a></span></code></div></div><div class="odoc-spec"><div class="spec value anchored" id="val-type_toplevel_phrase"><a href="#val-type_toplevel_phrase" class="anchor"></a><code><span><span class="keyword">val</span> type_toplevel_phrase :
|
||
<span><a href="../Env/index.html#type-t">Env.t</a> <span class="arrow">-></span></span>
|
||
<span><a href="../Parsetree/index.html#type-structure">Parsetree.structure</a> <span class="arrow">-></span></span>
|
||
<a href="../Typedtree/index.html#type-structure">Typedtree.structure</a> * <a href="../Types/index.html#type-signature">Types.signature</a> * <a href="Signature_names/index.html#type-t">Signature_names.t</a> * <a href="../Shape/index.html#type-t">Shape.t</a> * <a href="../Env/index.html#type-t">Env.t</a></span></code></div></div><div class="odoc-spec"><div class="spec value anchored" id="val-type_implementation"><a href="#val-type_implementation" class="anchor"></a><code><span><span class="keyword">val</span> type_implementation :
|
||
<span>string <span class="arrow">-></span></span>
|
||
<span>string <span class="arrow">-></span></span>
|
||
<span>string <span class="arrow">-></span></span>
|
||
<span><a href="../Env/index.html#type-t">Env.t</a> <span class="arrow">-></span></span>
|
||
<span><a href="../Parsetree/index.html#type-structure">Parsetree.structure</a> <span class="arrow">-></span></span>
|
||
<a href="../Typedtree/index.html#type-implementation">Typedtree.implementation</a></span></code></div></div><div class="odoc-spec"><div class="spec value anchored" id="val-type_interface"><a href="#val-type_interface" class="anchor"></a><code><span><span class="keyword">val</span> type_interface : <span><a href="../Env/index.html#type-t">Env.t</a> <span class="arrow">-></span></span> <span><a href="../Parsetree/index.html#type-signature">Parsetree.signature</a> <span class="arrow">-></span></span> <a href="../Typedtree/index.html#type-signature">Typedtree.signature</a></span></code></div></div><div class="odoc-spec"><div class="spec value anchored" id="val-transl_signature"><a href="#val-transl_signature" class="anchor"></a><code><span><span class="keyword">val</span> transl_signature : <span><a href="../Env/index.html#type-t">Env.t</a> <span class="arrow">-></span></span> <span><a href="../Parsetree/index.html#type-signature">Parsetree.signature</a> <span class="arrow">-></span></span> <a href="../Typedtree/index.html#type-signature">Typedtree.signature</a></span></code></div></div><div class="odoc-spec"><div class="spec value anchored" id="val-check_nongen_signature"><a href="#val-check_nongen_signature" class="anchor"></a><code><span><span class="keyword">val</span> check_nongen_signature : <span><a href="../Env/index.html#type-t">Env.t</a> <span class="arrow">-></span></span> <span><a href="../Types/index.html#type-signature">Types.signature</a> <span class="arrow">-></span></span> unit</span></code></div></div><div class="odoc-spec"><div class="spec value anchored" id="val-modtype_of_package"><a href="#val-modtype_of_package" class="anchor"></a><code><span><span class="keyword">val</span> modtype_of_package :
|
||
<span><a href="../Env/index.html#type-t">Env.t</a> <span class="arrow">-></span></span>
|
||
<span><a href="../Location/index.html#type-t">Location.t</a> <span class="arrow">-></span></span>
|
||
<span><a href="../Path/index.html#type-t">Path.t</a> <span class="arrow">-></span></span>
|
||
<span><span><span>(<a href="../Longident/index.html#type-t">Longident.t</a> * <a href="../Types/index.html#type-type_expr">Types.type_expr</a>)</span> list</span> <span class="arrow">-></span></span>
|
||
<a href="../Types/index.html#type-module_type">Types.module_type</a></span></code></div></div><div class="odoc-spec"><div class="spec value anchored" id="val-path_of_module"><a href="#val-path_of_module" class="anchor"></a><code><span><span class="keyword">val</span> path_of_module : <span><a href="../Typedtree/index.html#type-module_expr">Typedtree.module_expr</a> <span class="arrow">-></span></span> <span><a href="../Path/index.html#type-t">Path.t</a> option</span></span></code></div></div><div class="odoc-spec"><div class="spec value anchored" id="val-save_signature"><a href="#val-save_signature" class="anchor"></a><code><span><span class="keyword">val</span> save_signature :
|
||
<span>string <span class="arrow">-></span></span>
|
||
<span><a href="../Typedtree/index.html#type-signature">Typedtree.signature</a> <span class="arrow">-></span></span>
|
||
<span>string <span class="arrow">-></span></span>
|
||
<span>string <span class="arrow">-></span></span>
|
||
<span><a href="../Env/index.html#type-t">Env.t</a> <span class="arrow">-></span></span>
|
||
<span><a href="../Cmi_format/index.html#type-cmi_infos">Cmi_format.cmi_infos</a> <span class="arrow">-></span></span>
|
||
unit</span></code></div></div><div class="odoc-spec"><div class="spec value anchored" id="val-package_units"><a href="#val-package_units" class="anchor"></a><code><span><span class="keyword">val</span> package_units :
|
||
<span><a href="../Env/index.html#type-t">Env.t</a> <span class="arrow">-></span></span>
|
||
<span><span>string list</span> <span class="arrow">-></span></span>
|
||
<span>string <span class="arrow">-></span></span>
|
||
<span>string <span class="arrow">-></span></span>
|
||
<a href="../Typedtree/index.html#type-module_coercion">Typedtree.module_coercion</a></span></code></div></div><div class="odoc-spec"><div class="spec value anchored" id="val-initial_env"><a href="#val-initial_env" class="anchor"></a><code><span><span class="keyword">val</span> initial_env :
|
||
<span><span class="label">loc</span>:<a href="../Location/index.html#type-t">Location.t</a> <span class="arrow">-></span></span>
|
||
<span><span class="label">initially_opened_module</span>:<span>string option</span> <span class="arrow">-></span></span>
|
||
<span><span class="label">open_implicit_modules</span>:<span>string list</span> <span class="arrow">-></span></span>
|
||
<a href="../Env/index.html#type-t">Env.t</a></span></code></div></div><div class="odoc-spec"><div class="spec module anchored" id="module-Sig_component_kind"><a href="#module-Sig_component_kind" class="anchor"></a><code><span><span class="keyword">module</span> <a href="Sig_component_kind/index.html">Sig_component_kind</a></span><span> : <span class="keyword">sig</span> ... <span class="keyword">end</span></span></code></div></div><div class="odoc-spec"><div class="spec type anchored" id="type-hiding_error"><a href="#type-hiding_error" class="anchor"></a><code><span><span class="keyword">type</span> hiding_error</span><span> = </span></code><ol><li id="type-hiding_error.Illegal_shadowing" class="def variant constructor anchored"><a href="#type-hiding_error.Illegal_shadowing" class="anchor"></a><code><span>| </span><span><span class="constructor">Illegal_shadowing</span> <span class="keyword">of</span> </span><span>{</span></code><ol><li id="type-hiding_error.shadowed_item_id" class="def record field anchored"><a href="#type-hiding_error.shadowed_item_id" class="anchor"></a><code><span>shadowed_item_id : <a href="../Ident/index.html#type-t">Ident.t</a>;</span></code></li><li id="type-hiding_error.shadowed_item_kind" class="def record field anchored"><a href="#type-hiding_error.shadowed_item_kind" class="anchor"></a><code><span>shadowed_item_kind : <a href="Sig_component_kind/index.html#type-t">Sig_component_kind.t</a>;</span></code></li><li id="type-hiding_error.shadowed_item_loc" class="def record field anchored"><a href="#type-hiding_error.shadowed_item_loc" class="anchor"></a><code><span>shadowed_item_loc : <a href="../Location/index.html#type-t">Location.t</a>;</span></code></li><li id="type-hiding_error.shadower_id" class="def record field anchored"><a href="#type-hiding_error.shadower_id" class="anchor"></a><code><span>shadower_id : <a href="../Ident/index.html#type-t">Ident.t</a>;</span></code></li><li id="type-hiding_error.user_id" class="def record field anchored"><a href="#type-hiding_error.user_id" class="anchor"></a><code><span>user_id : <a href="../Ident/index.html#type-t">Ident.t</a>;</span></code></li><li id="type-hiding_error.user_kind" class="def record field anchored"><a href="#type-hiding_error.user_kind" class="anchor"></a><code><span>user_kind : <a href="Sig_component_kind/index.html#type-t">Sig_component_kind.t</a>;</span></code></li><li id="type-hiding_error.user_loc" class="def record field anchored"><a href="#type-hiding_error.user_loc" class="anchor"></a><code><span>user_loc : <a href="../Location/index.html#type-t">Location.t</a>;</span></code></li></ol><code><span>}</span></code></li><li id="type-hiding_error.Appears_in_signature" class="def variant constructor anchored"><a href="#type-hiding_error.Appears_in_signature" class="anchor"></a><code><span>| </span><span><span class="constructor">Appears_in_signature</span> <span class="keyword">of</span> </span><span>{</span></code><ol><li id="type-hiding_error.opened_item_id" class="def record field anchored"><a href="#type-hiding_error.opened_item_id" class="anchor"></a><code><span>opened_item_id : <a href="../Ident/index.html#type-t">Ident.t</a>;</span></code></li><li id="type-hiding_error.opened_item_kind" class="def record field anchored"><a href="#type-hiding_error.opened_item_kind" class="anchor"></a><code><span>opened_item_kind : <a href="Sig_component_kind/index.html#type-t">Sig_component_kind.t</a>;</span></code></li><li id="type-hiding_error.user_id" class="def record field anchored"><a href="#type-hiding_error.user_id" class="anchor"></a><code><span>user_id : <a href="../Ident/index.html#type-t">Ident.t</a>;</span></code></li><li id="type-hiding_error.user_kind" class="def record field anchored"><a href="#type-hiding_error.user_kind" class="anchor"></a><code><span>user_kind : <a href="Sig_component_kind/index.html#type-t">Sig_component_kind.t</a>;</span></code></li><li id="type-hiding_error.user_loc" class="def record field anchored"><a href="#type-hiding_error.user_loc" class="anchor"></a><code><span>user_loc : <a href="../Location/index.html#type-t">Location.t</a>;</span></code></li></ol><code><span>}</span></code></li></ol></div></div><div class="odoc-spec"><div class="spec type anchored" id="type-error"><a href="#type-error" class="anchor"></a><code><span><span class="keyword">type</span> error</span><span> = </span></code><ol><li id="type-error.Cannot_apply" class="def variant constructor anchored"><a href="#type-error.Cannot_apply" class="anchor"></a><code><span>| </span><span><span class="constructor">Cannot_apply</span> <span class="keyword">of</span> <a href="../Types/index.html#type-module_type">Types.module_type</a></span></code></li><li id="type-error.Not_included" class="def variant constructor anchored"><a href="#type-error.Not_included" class="anchor"></a><code><span>| </span><span><span class="constructor">Not_included</span> <span class="keyword">of</span> <a href="../Includemod/index.html#type-explanation">Includemod.explanation</a></span></code></li><li id="type-error.Cannot_eliminate_dependency" class="def variant constructor anchored"><a href="#type-error.Cannot_eliminate_dependency" class="anchor"></a><code><span>| </span><span><span class="constructor">Cannot_eliminate_dependency</span> <span class="keyword">of</span> <a href="../Types/index.html#type-module_type">Types.module_type</a></span></code></li><li id="type-error.Signature_expected" class="def variant constructor anchored"><a href="#type-error.Signature_expected" class="anchor"></a><code><span>| </span><span><span class="constructor">Signature_expected</span></span></code></li><li id="type-error.Structure_expected" class="def variant constructor anchored"><a href="#type-error.Structure_expected" class="anchor"></a><code><span>| </span><span><span class="constructor">Structure_expected</span> <span class="keyword">of</span> <a href="../Types/index.html#type-module_type">Types.module_type</a></span></code></li><li id="type-error.With_no_component" class="def variant constructor anchored"><a href="#type-error.With_no_component" class="anchor"></a><code><span>| </span><span><span class="constructor">With_no_component</span> <span class="keyword">of</span> <a href="../Longident/index.html#type-t">Longident.t</a></span></code></li><li id="type-error.With_mismatch" class="def variant constructor anchored"><a href="#type-error.With_mismatch" class="anchor"></a><code><span>| </span><span><span class="constructor">With_mismatch</span> <span class="keyword">of</span> <a href="../Longident/index.html#type-t">Longident.t</a> * <a href="../Includemod/index.html#type-explanation">Includemod.explanation</a></span></code></li><li id="type-error.With_makes_applicative_functor_ill_typed" class="def variant constructor anchored"><a href="#type-error.With_makes_applicative_functor_ill_typed" class="anchor"></a><code><span>| </span><span><span class="constructor">With_makes_applicative_functor_ill_typed</span> <span class="keyword">of</span> <a href="../Longident/index.html#type-t">Longident.t</a>
|
||
* <a href="../Path/index.html#type-t">Path.t</a>
|
||
* <a href="../Includemod/index.html#type-explanation">Includemod.explanation</a></span></code></li><li id="type-error.With_changes_module_alias" class="def variant constructor anchored"><a href="#type-error.With_changes_module_alias" class="anchor"></a><code><span>| </span><span><span class="constructor">With_changes_module_alias</span> <span class="keyword">of</span> <a href="../Longident/index.html#type-t">Longident.t</a> * <a href="../Ident/index.html#type-t">Ident.t</a> * <a href="../Path/index.html#type-t">Path.t</a></span></code></li><li id="type-error.With_cannot_remove_constrained_type" class="def variant constructor anchored"><a href="#type-error.With_cannot_remove_constrained_type" class="anchor"></a><code><span>| </span><span><span class="constructor">With_cannot_remove_constrained_type</span></span></code></li><li id="type-error.Repeated_name" class="def variant constructor anchored"><a href="#type-error.Repeated_name" class="anchor"></a><code><span>| </span><span><span class="constructor">Repeated_name</span> <span class="keyword">of</span> <a href="Sig_component_kind/index.html#type-t">Sig_component_kind.t</a> * string</span></code></li><li id="type-error.Non_generalizable" class="def variant constructor anchored"><a href="#type-error.Non_generalizable" class="anchor"></a><code><span>| </span><span><span class="constructor">Non_generalizable</span> <span class="keyword">of</span> <a href="../Types/index.html#type-type_expr">Types.type_expr</a></span></code></li><li id="type-error.Non_generalizable_module" class="def variant constructor anchored"><a href="#type-error.Non_generalizable_module" class="anchor"></a><code><span>| </span><span><span class="constructor">Non_generalizable_module</span> <span class="keyword">of</span> <a href="../Types/index.html#type-module_type">Types.module_type</a></span></code></li><li id="type-error.Implementation_is_required" class="def variant constructor anchored"><a href="#type-error.Implementation_is_required" class="anchor"></a><code><span>| </span><span><span class="constructor">Implementation_is_required</span> <span class="keyword">of</span> string</span></code></li><li id="type-error.Interface_not_compiled" class="def variant constructor anchored"><a href="#type-error.Interface_not_compiled" class="anchor"></a><code><span>| </span><span><span class="constructor">Interface_not_compiled</span> <span class="keyword">of</span> string</span></code></li><li id="type-error.Not_allowed_in_functor_body" class="def variant constructor anchored"><a href="#type-error.Not_allowed_in_functor_body" class="anchor"></a><code><span>| </span><span><span class="constructor">Not_allowed_in_functor_body</span></span></code></li><li id="type-error.Not_a_packed_module" class="def variant constructor anchored"><a href="#type-error.Not_a_packed_module" class="anchor"></a><code><span>| </span><span><span class="constructor">Not_a_packed_module</span> <span class="keyword">of</span> <a href="../Types/index.html#type-type_expr">Types.type_expr</a></span></code></li><li id="type-error.Incomplete_packed_module" class="def variant constructor anchored"><a href="#type-error.Incomplete_packed_module" class="anchor"></a><code><span>| </span><span><span class="constructor">Incomplete_packed_module</span> <span class="keyword">of</span> <a href="../Types/index.html#type-type_expr">Types.type_expr</a></span></code></li><li id="type-error.Scoping_pack" class="def variant constructor anchored"><a href="#type-error.Scoping_pack" class="anchor"></a><code><span>| </span><span><span class="constructor">Scoping_pack</span> <span class="keyword">of</span> <a href="../Longident/index.html#type-t">Longident.t</a> * <a href="../Types/index.html#type-type_expr">Types.type_expr</a></span></code></li><li id="type-error.Recursive_module_require_explicit_type" class="def variant constructor anchored"><a href="#type-error.Recursive_module_require_explicit_type" class="anchor"></a><code><span>| </span><span><span class="constructor">Recursive_module_require_explicit_type</span></span></code></li><li id="type-error.Apply_generative" class="def variant constructor anchored"><a href="#type-error.Apply_generative" class="anchor"></a><code><span>| </span><span><span class="constructor">Apply_generative</span></span></code></li><li id="type-error.Cannot_scrape_alias" class="def variant constructor anchored"><a href="#type-error.Cannot_scrape_alias" class="anchor"></a><code><span>| </span><span><span class="constructor">Cannot_scrape_alias</span> <span class="keyword">of</span> <a href="../Path/index.html#type-t">Path.t</a></span></code></li><li id="type-error.Cannot_scrape_package_type" class="def variant constructor anchored"><a href="#type-error.Cannot_scrape_package_type" class="anchor"></a><code><span>| </span><span><span class="constructor">Cannot_scrape_package_type</span> <span class="keyword">of</span> <a href="../Path/index.html#type-t">Path.t</a></span></code></li><li id="type-error.Badly_formed_signature" class="def variant constructor anchored"><a href="#type-error.Badly_formed_signature" class="anchor"></a><code><span>| </span><span><span class="constructor">Badly_formed_signature</span> <span class="keyword">of</span> string * <a href="../Typedecl/index.html#type-error">Typedecl.error</a></span></code></li><li id="type-error.Cannot_hide_id" class="def variant constructor anchored"><a href="#type-error.Cannot_hide_id" class="anchor"></a><code><span>| </span><span><span class="constructor">Cannot_hide_id</span> <span class="keyword">of</span> <a href="#type-hiding_error">hiding_error</a></span></code></li><li id="type-error.Invalid_type_subst_rhs" class="def variant constructor anchored"><a href="#type-error.Invalid_type_subst_rhs" class="anchor"></a><code><span>| </span><span><span class="constructor">Invalid_type_subst_rhs</span></span></code></li><li id="type-error.Unpackable_local_modtype_subst" class="def variant constructor anchored"><a href="#type-error.Unpackable_local_modtype_subst" class="anchor"></a><code><span>| </span><span><span class="constructor">Unpackable_local_modtype_subst</span> <span class="keyword">of</span> <a href="../Path/index.html#type-t">Path.t</a></span></code></li><li id="type-error.With_cannot_remove_packed_modtype" class="def variant constructor anchored"><a href="#type-error.With_cannot_remove_packed_modtype" class="anchor"></a><code><span>| </span><span><span class="constructor">With_cannot_remove_packed_modtype</span> <span class="keyword">of</span> <a href="../Path/index.html#type-t">Path.t</a> * <a href="../Types/index.html#type-module_type">Types.module_type</a></span></code></li></ol></div></div><div class="odoc-spec"><div class="spec exception anchored" id="exception-Error"><a href="#exception-Error" class="anchor"></a><code><span><span class="keyword">exception</span> </span><span><span class="exception">Error</span> <span class="keyword">of</span> <a href="../Location/index.html#type-t">Location.t</a> * <a href="../Env/index.html#type-t">Env.t</a> * <a href="#type-error">error</a></span></code></div></div><div class="odoc-spec"><div class="spec exception anchored" id="exception-Error_forward"><a href="#exception-Error_forward" class="anchor"></a><code><span><span class="keyword">exception</span> </span><span><span class="exception">Error_forward</span> <span class="keyword">of</span> <a href="../Location/index.html#type-error">Location.error</a></span></code></div></div><div class="odoc-spec"><div class="spec value anchored" id="val-report_error"><a href="#val-report_error" class="anchor"></a><code><span><span class="keyword">val</span> report_error : <span><a href="../Env/index.html#type-t">Env.t</a> <span class="arrow">-></span></span> <span><span class="label">loc</span>:<a href="../Location/index.html#type-t">Location.t</a> <span class="arrow">-></span></span> <span><a href="#type-error">error</a> <span class="arrow">-></span></span> <a href="../Location/index.html#type-error">Location.error</a></span></code></div></div></div></body></html>
|