mirror of
https://github.com/c-cube/moonpool.git
synced 2025-12-18 08:36:43 -05:00
23 lines
21 KiB
HTML
23 lines
21 KiB
HTML
<!DOCTYPE html>
|
||
<html xmlns="http://www.w3.org/1999/xhtml"><head><title>Typeclass (ocaml.Typeclass)</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> » Typeclass</nav><header class="odoc-preamble"><h1>Module <code><span>Typeclass</span></code></h1></header><div class="odoc-content"><div class="odoc-spec"><div class="spec type anchored" id="type-class_info"><a href="#type-class_info" class="anchor"></a><code><span><span class="keyword">type</span> <span>'a class_info</span></span><span> = </span><span>{</span></code><ol><li id="type-class_info.cls_id" class="def record field anchored"><a href="#type-class_info.cls_id" class="anchor"></a><code><span>cls_id : <a href="../Ident/index.html#type-t">Ident.t</a>;</span></code></li><li id="type-class_info.cls_id_loc" class="def record field anchored"><a href="#type-class_info.cls_id_loc" class="anchor"></a><code><span>cls_id_loc : <span>string <a href="../Asttypes/index.html#type-loc">Asttypes.loc</a></span>;</span></code></li><li id="type-class_info.cls_decl" class="def record field anchored"><a href="#type-class_info.cls_decl" class="anchor"></a><code><span>cls_decl : <a href="../Types/index.html#type-class_declaration">Types.class_declaration</a>;</span></code></li><li id="type-class_info.cls_ty_id" class="def record field anchored"><a href="#type-class_info.cls_ty_id" class="anchor"></a><code><span>cls_ty_id : <a href="../Ident/index.html#type-t">Ident.t</a>;</span></code></li><li id="type-class_info.cls_ty_decl" class="def record field anchored"><a href="#type-class_info.cls_ty_decl" class="anchor"></a><code><span>cls_ty_decl : <a href="../Types/index.html#type-class_type_declaration">Types.class_type_declaration</a>;</span></code></li><li id="type-class_info.cls_obj_id" class="def record field anchored"><a href="#type-class_info.cls_obj_id" class="anchor"></a><code><span>cls_obj_id : <a href="../Ident/index.html#type-t">Ident.t</a>;</span></code></li><li id="type-class_info.cls_obj_abbr" class="def record field anchored"><a href="#type-class_info.cls_obj_abbr" class="anchor"></a><code><span>cls_obj_abbr : <a href="../Types/index.html#type-type_declaration">Types.type_declaration</a>;</span></code></li><li id="type-class_info.cls_typesharp_id" class="def record field anchored"><a href="#type-class_info.cls_typesharp_id" class="anchor"></a><code><span>cls_typesharp_id : <a href="../Ident/index.html#type-t">Ident.t</a>;</span></code></li><li id="type-class_info.cls_abbr" class="def record field anchored"><a href="#type-class_info.cls_abbr" class="anchor"></a><code><span>cls_abbr : <a href="../Types/index.html#type-type_declaration">Types.type_declaration</a>;</span></code></li><li id="type-class_info.cls_arity" class="def record field anchored"><a href="#type-class_info.cls_arity" class="anchor"></a><code><span>cls_arity : int;</span></code></li><li id="type-class_info.cls_pub_methods" class="def record field anchored"><a href="#type-class_info.cls_pub_methods" class="anchor"></a><code><span>cls_pub_methods : <span>string list</span>;</span></code></li><li id="type-class_info.cls_info" class="def record field anchored"><a href="#type-class_info.cls_info" class="anchor"></a><code><span>cls_info : <span class="type-var">'a</span>;</span></code></li></ol><code><span>}</span></code></div></div><div class="odoc-spec"><div class="spec type anchored" id="type-class_type_info"><a href="#type-class_type_info" class="anchor"></a><code><span><span class="keyword">type</span> class_type_info</span><span> = </span><span>{</span></code><ol><li id="type-class_type_info.clsty_ty_id" class="def record field anchored"><a href="#type-class_type_info.clsty_ty_id" class="anchor"></a><code><span>clsty_ty_id : <a href="../Ident/index.html#type-t">Ident.t</a>;</span></code></li><li id="type-class_type_info.clsty_id_loc" class="def record field anchored"><a href="#type-class_type_info.clsty_id_loc" class="anchor"></a><code><span>clsty_id_loc : <span>string <a href="../Asttypes/index.html#type-loc">Asttypes.loc</a></span>;</span></code></li><li id="type-class_type_info.clsty_ty_decl" class="def record field anchored"><a href="#type-class_type_info.clsty_ty_decl" class="anchor"></a><code><span>clsty_ty_decl : <a href="../Types/index.html#type-class_type_declaration">Types.class_type_declaration</a>;</span></code></li><li id="type-class_type_info.clsty_obj_id" class="def record field anchored"><a href="#type-class_type_info.clsty_obj_id" class="anchor"></a><code><span>clsty_obj_id : <a href="../Ident/index.html#type-t">Ident.t</a>;</span></code></li><li id="type-class_type_info.clsty_obj_abbr" class="def record field anchored"><a href="#type-class_type_info.clsty_obj_abbr" class="anchor"></a><code><span>clsty_obj_abbr : <a href="../Types/index.html#type-type_declaration">Types.type_declaration</a>;</span></code></li><li id="type-class_type_info.clsty_typesharp_id" class="def record field anchored"><a href="#type-class_type_info.clsty_typesharp_id" class="anchor"></a><code><span>clsty_typesharp_id : <a href="../Ident/index.html#type-t">Ident.t</a>;</span></code></li><li id="type-class_type_info.clsty_abbr" class="def record field anchored"><a href="#type-class_type_info.clsty_abbr" class="anchor"></a><code><span>clsty_abbr : <a href="../Types/index.html#type-type_declaration">Types.type_declaration</a>;</span></code></li><li id="type-class_type_info.clsty_info" class="def record field anchored"><a href="#type-class_type_info.clsty_info" class="anchor"></a><code><span>clsty_info : <a href="../Typedtree/index.html#type-class_type_declaration">Typedtree.class_type_declaration</a>;</span></code></li></ol><code><span>}</span></code></div></div><div class="odoc-spec"><div class="spec value anchored" id="val-class_declarations"><a href="#val-class_declarations" class="anchor"></a><code><span><span class="keyword">val</span> class_declarations :
|
||
<span><a href="../Env/index.html#type-t">Env.t</a> <span class="arrow">-></span></span>
|
||
<span><span><a href="../Parsetree/index.html#type-class_declaration">Parsetree.class_declaration</a> list</span> <span class="arrow">-></span></span>
|
||
<span><span><a href="../Typedtree/index.html#type-class_declaration">Typedtree.class_declaration</a> <a href="#type-class_info">class_info</a></span> list</span> * <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-class_descriptions"><a href="#val-class_descriptions" class="anchor"></a><code><span><span class="keyword">val</span> class_descriptions :
|
||
<span><a href="../Env/index.html#type-t">Env.t</a> <span class="arrow">-></span></span>
|
||
<span><span><a href="../Parsetree/index.html#type-class_description">Parsetree.class_description</a> list</span> <span class="arrow">-></span></span>
|
||
<span><span><a href="../Typedtree/index.html#type-class_description">Typedtree.class_description</a> <a href="#type-class_info">class_info</a></span> list</span> * <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-class_type_declarations"><a href="#val-class_type_declarations" class="anchor"></a><code><span><span class="keyword">val</span> class_type_declarations :
|
||
<span><a href="../Env/index.html#type-t">Env.t</a> <span class="arrow">-></span></span>
|
||
<span><span><a href="../Parsetree/index.html#type-class_description">Parsetree.class_description</a> list</span> <span class="arrow">-></span></span>
|
||
<span><a href="#type-class_type_info">class_type_info</a> list</span> * <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-approx_class_declarations"><a href="#val-approx_class_declarations" class="anchor"></a><code><span><span class="keyword">val</span> approx_class_declarations :
|
||
<span><a href="../Env/index.html#type-t">Env.t</a> <span class="arrow">-></span></span>
|
||
<span><span><a href="../Parsetree/index.html#type-class_description">Parsetree.class_description</a> list</span> <span class="arrow">-></span></span>
|
||
<span><a href="#type-class_type_info">class_type_info</a> list</span></span></code></div></div><div class="odoc-spec"><div class="spec type anchored" id="type-kind"><a href="#type-kind" class="anchor"></a><code><span><span class="keyword">type</span> kind</span><span> = </span></code><ol><li id="type-kind.Object" class="def variant constructor anchored"><a href="#type-kind.Object" class="anchor"></a><code><span>| </span><span><span class="constructor">Object</span></span></code></li><li id="type-kind.Class" class="def variant constructor anchored"><a href="#type-kind.Class" class="anchor"></a><code><span>| </span><span><span class="constructor">Class</span></span></code></li><li id="type-kind.Class_type" class="def variant constructor anchored"><a href="#type-kind.Class_type" class="anchor"></a><code><span>| </span><span><span class="constructor">Class_type</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.Unconsistent_constraint" class="def variant constructor anchored"><a href="#type-error.Unconsistent_constraint" class="anchor"></a><code><span>| </span><span><span class="constructor">Unconsistent_constraint</span> <span class="keyword">of</span> <a href="../Errortrace/index.html#type-unification_error">Errortrace.unification_error</a></span></code></li><li id="type-error.Field_type_mismatch" class="def variant constructor anchored"><a href="#type-error.Field_type_mismatch" class="anchor"></a><code><span>| </span><span><span class="constructor">Field_type_mismatch</span> <span class="keyword">of</span> string * string * <a href="../Errortrace/index.html#type-unification_error">Errortrace.unification_error</a></span></code></li><li id="type-error.Unexpected_field" class="def variant constructor anchored"><a href="#type-error.Unexpected_field" class="anchor"></a><code><span>| </span><span><span class="constructor">Unexpected_field</span> <span class="keyword">of</span> <a href="../Types/index.html#type-type_expr">Types.type_expr</a> * string</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-class_type">Types.class_type</a></span></code></li><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-class_type">Types.class_type</a></span></code></li><li id="type-error.Apply_wrong_label" class="def variant constructor anchored"><a href="#type-error.Apply_wrong_label" class="anchor"></a><code><span>| </span><span><span class="constructor">Apply_wrong_label</span> <span class="keyword">of</span> <a href="../Asttypes/index.html#type-arg_label">Asttypes.arg_label</a></span></code></li><li id="type-error.Pattern_type_clash" class="def variant constructor anchored"><a href="#type-error.Pattern_type_clash" class="anchor"></a><code><span>| </span><span><span class="constructor">Pattern_type_clash</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.Repeated_parameter" class="def variant constructor anchored"><a href="#type-error.Repeated_parameter" class="anchor"></a><code><span>| </span><span><span class="constructor">Repeated_parameter</span></span></code></li><li id="type-error.Unbound_class_2" class="def variant constructor anchored"><a href="#type-error.Unbound_class_2" class="anchor"></a><code><span>| </span><span><span class="constructor">Unbound_class_2</span> <span class="keyword">of</span> <a href="../Longident/index.html#type-t">Longident.t</a></span></code></li><li id="type-error.Unbound_class_type_2" class="def variant constructor anchored"><a href="#type-error.Unbound_class_type_2" class="anchor"></a><code><span>| </span><span><span class="constructor">Unbound_class_type_2</span> <span class="keyword">of</span> <a href="../Longident/index.html#type-t">Longident.t</a></span></code></li><li id="type-error.Abbrev_type_clash" class="def variant constructor anchored"><a href="#type-error.Abbrev_type_clash" class="anchor"></a><code><span>| </span><span><span class="constructor">Abbrev_type_clash</span> <span class="keyword">of</span> <a href="../Types/index.html#type-type_expr">Types.type_expr</a> * <a href="../Types/index.html#type-type_expr">Types.type_expr</a> * <a href="../Types/index.html#type-type_expr">Types.type_expr</a></span></code></li><li id="type-error.Constructor_type_mismatch" class="def variant constructor anchored"><a href="#type-error.Constructor_type_mismatch" class="anchor"></a><code><span>| </span><span><span class="constructor">Constructor_type_mismatch</span> <span class="keyword">of</span> string * <a href="../Errortrace/index.html#type-unification_error">Errortrace.unification_error</a></span></code></li><li id="type-error.Virtual_class" class="def variant constructor anchored"><a href="#type-error.Virtual_class" class="anchor"></a><code><span>| </span><span><span class="constructor">Virtual_class</span> <span class="keyword">of</span> <a href="#type-kind">kind</a> * <span>string list</span> * <span>string list</span></span></code></li><li id="type-error.Undeclared_methods" class="def variant constructor anchored"><a href="#type-error.Undeclared_methods" class="anchor"></a><code><span>| </span><span><span class="constructor">Undeclared_methods</span> <span class="keyword">of</span> <a href="#type-kind">kind</a> * <span>string list</span></span></code></li><li id="type-error.Parameter_arity_mismatch" class="def variant constructor anchored"><a href="#type-error.Parameter_arity_mismatch" class="anchor"></a><code><span>| </span><span><span class="constructor">Parameter_arity_mismatch</span> <span class="keyword">of</span> <a href="../Longident/index.html#type-t">Longident.t</a> * int * int</span></code></li><li id="type-error.Parameter_mismatch" class="def variant constructor anchored"><a href="#type-error.Parameter_mismatch" class="anchor"></a><code><span>| </span><span><span class="constructor">Parameter_mismatch</span> <span class="keyword">of</span> <a href="../Errortrace/index.html#type-unification_error">Errortrace.unification_error</a></span></code></li><li id="type-error.Bad_parameters" class="def variant constructor anchored"><a href="#type-error.Bad_parameters" class="anchor"></a><code><span>| </span><span><span class="constructor">Bad_parameters</span> <span class="keyword">of</span> <a href="../Ident/index.html#type-t">Ident.t</a> * <a href="../Types/index.html#type-type_expr">Types.type_expr</a> * <a href="../Types/index.html#type-type_expr">Types.type_expr</a></span></code></li><li id="type-error.Class_match_failure" class="def variant constructor anchored"><a href="#type-error.Class_match_failure" class="anchor"></a><code><span>| </span><span><span class="constructor">Class_match_failure</span> <span class="keyword">of</span> <span><a href="../Ctype/index.html#type-class_match_failure">Ctype.class_match_failure</a> list</span></span></code></li><li id="type-error.Unbound_val" class="def variant constructor anchored"><a href="#type-error.Unbound_val" class="anchor"></a><code><span>| </span><span><span class="constructor">Unbound_val</span> <span class="keyword">of</span> string</span></code></li><li id="type-error.Unbound_type_var" class="def variant constructor anchored"><a href="#type-error.Unbound_type_var" class="anchor"></a><code><span>| </span><span><span class="constructor">Unbound_type_var</span> <span class="keyword">of</span> <span><a href="../Stdlib/Format/index.html#type-formatter">Stdlib.Format.formatter</a> <span class="arrow">-></span></span>
|
||
unit
|
||
* <a href="../Types/index.html#type-type_expr">Types.type_expr</a> * bool * string * <a href="../Types/index.html#type-type_expr">Types.type_expr</a></span></code></li><li id="type-error.Non_generalizable_class" class="def variant constructor anchored"><a href="#type-error.Non_generalizable_class" class="anchor"></a><code><span>| </span><span><span class="constructor">Non_generalizable_class</span> <span class="keyword">of</span> <a href="../Ident/index.html#type-t">Ident.t</a> * <a href="../Types/index.html#type-class_declaration">Types.class_declaration</a></span></code></li><li id="type-error.Cannot_coerce_self" class="def variant constructor anchored"><a href="#type-error.Cannot_coerce_self" class="anchor"></a><code><span>| </span><span><span class="constructor">Cannot_coerce_self</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_collapsable_conjunction" class="def variant constructor anchored"><a href="#type-error.Non_collapsable_conjunction" class="anchor"></a><code><span>| </span><span><span class="constructor">Non_collapsable_conjunction</span> <span class="keyword">of</span> <a href="../Ident/index.html#type-t">Ident.t</a>
|
||
* <a href="../Types/index.html#type-class_declaration">Types.class_declaration</a>
|
||
* <a href="../Errortrace/index.html#type-unification_error">Errortrace.unification_error</a></span></code></li><li id="type-error.Self_clash" class="def variant constructor anchored"><a href="#type-error.Self_clash" class="anchor"></a><code><span>| </span><span><span class="constructor">Self_clash</span> <span class="keyword">of</span> <a href="../Errortrace/index.html#type-unification_error">Errortrace.unification_error</a></span></code></li><li id="type-error.Mutability_mismatch" class="def variant constructor anchored"><a href="#type-error.Mutability_mismatch" class="anchor"></a><code><span>| </span><span><span class="constructor">Mutability_mismatch</span> <span class="keyword">of</span> string * <a href="../Asttypes/index.html#type-mutable_flag">Asttypes.mutable_flag</a></span></code></li><li id="type-error.No_overriding" class="def variant constructor anchored"><a href="#type-error.No_overriding" class="anchor"></a><code><span>| </span><span><span class="constructor">No_overriding</span> <span class="keyword">of</span> string * string</span></code></li><li id="type-error.Duplicate" class="def variant constructor anchored"><a href="#type-error.Duplicate" class="anchor"></a><code><span>| </span><span><span class="constructor">Duplicate</span> <span class="keyword">of</span> string * string</span></code></li><li id="type-error.Closing_self_type" class="def variant constructor anchored"><a href="#type-error.Closing_self_type" class="anchor"></a><code><span>| </span><span><span class="constructor">Closing_self_type</span> <span class="keyword">of</span> <a href="../Types/index.html#type-class_signature">Types.class_signature</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><a href="../Stdlib/Format/index.html#type-formatter">Stdlib.Format.formatter</a> <span class="arrow">-></span></span> <span><a href="#type-error">error</a> <span class="arrow">-></span></span> unit</span></code></div></div><div class="odoc-spec"><div class="spec value anchored" id="val-type_open_descr"><a href="#val-type_open_descr" class="anchor"></a><code><span><span class="keyword">val</span> type_open_descr :
|
||
<span><span>(<span><span class="optlabel">?used_slot</span>:<span>bool <a href="../Stdlib/index.html#type-ref">ref</a></span> <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-open_description">Parsetree.open_description</a> <span class="arrow">-></span></span>
|
||
<a href="../Typedtree/index.html#type-open_description">Typedtree.open_description</a> * <a href="../Env/index.html#type-t">Env.t</a>)</span>
|
||
<a href="../Stdlib/index.html#type-ref">ref</a></span></span></code></div></div></div></body></html>
|