Module Ocaml_typing.Mode_hint
A description of what type of item is being closed over
type ident = {category : Ocaml_typing.Mode_hint.lock_item;lid : Ocaml_parsing.Longident.t;(*Sometimes we want the ident to represent
*)M.xbut the loc can only point toM. This field would storeM.x.
}type pinpoint_desc = | Unknown| Ident of Ocaml_typing.Mode_hint.ident(*An identifier
*)| Function(*A function definition
*)| Functor(*A functor definition
*)| Lazy(*A lazy expression
*)| Allocation(*An allocation
*)| Expression(*An arbitrary expression
*)| Class(*An class declaration
*)| Object(*An object declaration
*)| Loop(*a loop
*)| Letop(*let op
*)| Cases_result(*the result of cases
*)
Description of pinpoints to accompany the location. The constructors are not mutually exclusive - some might be more precise than others
type pinpoint = Ocaml_parsing.Location.t * Ocaml_typing.Mode_hint.pinpoint_descA pinpoint is a location in the source code, accompanied by additional description
type 'd const = | Unknown : ('l * 'r) Ocaml_typing.Mode_hint.const(*The constant bound is not explained.
*)| Lazy_allocated_on_heap : (Ocaml_typing.Allowance.disallowed * 'r) Ocaml_typing.Allowance.pos Ocaml_typing.Mode_hint.const| Class_legacy_monadic : ('l * Ocaml_typing.Allowance.disallowed) Ocaml_typing.Allowance.neg Ocaml_typing.Mode_hint.const| Class_legacy_comonadic : ('l * Ocaml_typing.Allowance.disallowed) Ocaml_typing.Allowance.pos Ocaml_typing.Mode_hint.const| Tailcall_function : (Ocaml_typing.Allowance.disallowed * 'r) Ocaml_typing.Allowance.pos Ocaml_typing.Mode_hint.const| Tailcall_argument : (Ocaml_typing.Allowance.disallowed * 'r) Ocaml_typing.Allowance.pos Ocaml_typing.Mode_hint.const| Mutable_read : Ocaml_typing.Mode_hint.mutable_part -> (Ocaml_typing.Allowance.disallowed * 'r) Ocaml_typing.Allowance.neg Ocaml_typing.Mode_hint.const| Mutable_write : Ocaml_typing.Mode_hint.mutable_part -> (Ocaml_typing.Allowance.disallowed * 'r) Ocaml_typing.Allowance.neg Ocaml_typing.Mode_hint.const| Lazy_forced : (Ocaml_typing.Allowance.disallowed * 'r) Ocaml_typing.Allowance.neg Ocaml_typing.Mode_hint.const| Function_return : (Ocaml_typing.Allowance.disallowed * 'r) Ocaml_typing.Allowance.pos Ocaml_typing.Mode_hint.const| Stack_expression : ('l * Ocaml_typing.Allowance.disallowed) Ocaml_typing.Allowance.pos Ocaml_typing.Mode_hint.const| Module_allocated_on_heap : (Ocaml_typing.Allowance.disallowed * 'r) Ocaml_typing.Allowance.pos Ocaml_typing.Mode_hint.const| Always_dynamic : Ocaml_typing.Mode_hint.always_dynamic -> ('l * Ocaml_typing.Allowance.disallowed) Ocaml_typing.Allowance.neg Ocaml_typing.Mode_hint.const| Branching : ('l * Ocaml_typing.Allowance.disallowed) Ocaml_typing.Allowance.neg Ocaml_typing.Mode_hint.const| Is_used_in : Ocaml_typing.Mode_hint.pinpoint -> (Ocaml_typing.Allowance.disallowed * 'r) Ocaml_typing.Mode_hint.const(*A variant of
*)Is_closed_bywhere the closure mode is constant. INVARIANT: Thepinpointcannot beUnknown.
constraint 'd = _ * _Hint for a constant bound. See Mode.Report.print_const for what each non-trivial constructor means.
type ('d0, 'd1) polarity = | Monadic : ('l * 'r, 'r * 'l) Ocaml_typing.Mode_hint.polarity| Comonadic : ('l * 'r, 'l * 'r) Ocaml_typing.Mode_hint.polarity
constraint 'd0 = _ * _ constraint 'd1 = _ * _type closure_details = {closure : Ocaml_typing.Mode_hint.pinpoint;closed : Ocaml_typing.Mode_hint.pinpoint;
}type contains = {containing : Ocaml_typing.Mode_hint.containing;contained : Ocaml_typing.Mode_hint.pinpoint;
}type is_contained_by = {containing : Ocaml_typing.Mode_hint.containing;container : Ocaml_parsing.Location.t;
}type allocation =
Ocaml_typing.Mode_hint.allocation_desc Ocaml_parsing.Location.loctype 'd morph = | Unknown : ('l * 'r) Ocaml_typing.Mode_hint.morph(*The morphism is not explained.
*)| Unknown_non_rigid : ('l * 'r) Ocaml_typing.Mode_hint.morph(*Similiar to
*)Unknown, but in the special case where the morph doesn't change the bound, it can be skipped.| Skip : ('l * 'r) Ocaml_typing.Mode_hint.morph(*The morphism doesn't change the bound and should be skipped in printing.
*)| Close_over : ('d, 'l * Ocaml_typing.Allowance.disallowed) Ocaml_typing.Mode_hint.polarity * Ocaml_typing.Mode_hint.closure_details -> ('l * Ocaml_typing.Allowance.disallowed) Ocaml_typing.Mode_hint.morph| Is_closed_by : ('d, Ocaml_typing.Allowance.disallowed * 'r) Ocaml_typing.Mode_hint.polarity * Ocaml_typing.Mode_hint.closure_details -> (Ocaml_typing.Allowance.disallowed * 'r) Ocaml_typing.Mode_hint.morph| Captured_by_partial_application : (Ocaml_typing.Allowance.disallowed * 'r) Ocaml_typing.Mode_hint.morph| Adj_captured_by_partial_application : ('l * Ocaml_typing.Allowance.disallowed) Ocaml_typing.Mode_hint.morph| Crossing : ('l * 'r) Ocaml_typing.Mode_hint.morph| Allocation_r : Ocaml_typing.Mode_hint.allocation -> (Ocaml_typing.Allowance.disallowed * 'r) Ocaml_typing.Mode_hint.morph| Allocation_l : Ocaml_typing.Mode_hint.allocation -> ('l * Ocaml_typing.Allowance.disallowed) Ocaml_typing.Mode_hint.morph| Contains_l : ('l * Ocaml_typing.Allowance.disallowed, 'd) Ocaml_typing.Mode_hint.polarity * Ocaml_typing.Mode_hint.contains -> 'd Ocaml_typing.Mode_hint.morph| Is_contained_by : ('l * 'r, 'd) Ocaml_typing.Mode_hint.polarity * Ocaml_typing.Mode_hint.is_contained_by -> 'd Ocaml_typing.Mode_hint.morph| Contains_r : (Ocaml_typing.Allowance.disallowed * 'r, 'd) Ocaml_typing.Mode_hint.polarity * Ocaml_typing.Mode_hint.contains -> 'd Ocaml_typing.Mode_hint.morph
constraint 'd = _ * _Hint for morphisms. When acompanied by a destination pinpoint, morph gives a source pinpoint and explains the relation between them. See Mode.Report.print_morph for what each non-trivial constructor means.