package ocaml-base-compiler
Install
dune-project
Dependency
Authors
Maintainers
Sources
sha256=d3eaf17fcd8722827ae15c560a419ee52cf7e066f1d6cb80df621bfd3a17d61c
doc/ocamlcommon/Printtyp/index.html
Module Printtyp
val longident : Format.formatter -> Longident.t -> unitval ident : Format.formatter -> Ident.t -> unitval tree_of_path : Path.t -> Outcometree.out_identval path : Format.formatter -> Path.t -> unitval string_of_path : Path.t -> stringval type_path : Format.formatter -> Path.t -> unitPrint a type path taking account of -short-paths. Calls should be within wrap_printing_env.
module Out_name : sig ... endPrint a list of paths, using the same naming context to avoid name collisions
val raw_type_expr : Format.formatter -> Types.type_expr -> unitval string_of_label : Asttypes.arg_label -> stringval wrap_printing_env : error:bool -> Env.t -> (unit -> 'a) -> 'amodule Naming_context : sig ... endmodule Conflicts : sig ... endThe Conflicts module keeps track of conflicts arising when attributing names to identifiers and provides functions that can print explanations for these conflict in error messages
val mark_loops : Types.type_expr -> unitval reset_and_mark_loops : Types.type_expr -> unitval reset_and_mark_loops_list : Types.type_expr list -> unitval type_expr : Format.formatter -> Types.type_expr -> unitval marked_type_expr : Format.formatter -> Types.type_expr -> unitThe function type_expr is the safe version of the pair (typed_expr, marked_type_expr): it takes care of marking loops in the type expression and resetting type variable names before printing. Contrarily, the function marked_type_expr should only be called on type expressions whose loops have been marked or it may stackoverflow (see #8860 for examples).
val constructor_arguments :
Format.formatter ->
Types.constructor_arguments ->
unitval tree_of_type_scheme : Types.type_expr -> Outcometree.out_typeval type_sch : Format.formatter -> Types.type_expr -> unitval type_scheme : Format.formatter -> Types.type_expr -> unitval type_scheme_max :
?b_reset_names:bool ->
Format.formatter ->
Types.type_expr ->
unitval tree_of_value_description :
Ident.t ->
Types.value_description ->
Outcometree.out_sig_itemval value_description :
Ident.t ->
Format.formatter ->
Types.value_description ->
unitval label : Format.formatter -> Types.label_declaration -> unitval constructor : Format.formatter -> Types.constructor_declaration -> unitval tree_of_type_declaration :
Ident.t ->
Types.type_declaration ->
Types.rec_status ->
Outcometree.out_sig_itemval type_declaration :
Ident.t ->
Format.formatter ->
Types.type_declaration ->
unitval tree_of_extension_constructor :
Ident.t ->
Types.extension_constructor ->
Types.ext_status ->
Outcometree.out_sig_itemval extension_constructor :
Ident.t ->
Format.formatter ->
Types.extension_constructor ->
unitval extension_only_constructor :
Ident.t ->
Format.formatter ->
Types.extension_constructor ->
unitval tree_of_module :
Ident.t ->
?ellipsis:bool ->
Types.module_type ->
Types.rec_status ->
Outcometree.out_sig_itemval modtype : Format.formatter -> Types.module_type -> unitval signature : Format.formatter -> Types.signature -> unitval tree_of_modtype : Types.module_type -> Outcometree.out_module_typeval tree_of_modtype_declaration :
Ident.t ->
Types.modtype_declaration ->
Outcometree.out_sig_itemval functor_parameters :
sep:(Format.formatter -> unit -> unit) ->
('b -> Format.formatter -> unit) ->
(Ident.t option * 'b) list ->
Format.formatter ->
unitPrint a list of functor parameters while adjusting the printing environment for each functor argument.
Currently, we are disabling disambiguation for functor argument name to avoid the need to track the moving association between identifiers and syntactic names in situation like:
got: (X: sig module type T end) (Y:X.T) (X:sig module type T end) (Z:X.T) expect: (_: sig end) (Y:X.T) (_:sig end) (Z:X.T)
val tree_of_signature : Types.signature -> Outcometree.out_sig_item listval tree_of_typexp : bool -> Types.type_expr -> Outcometree.out_typeval modtype_declaration :
Ident.t ->
Format.formatter ->
Types.modtype_declaration ->
unitval class_type : Format.formatter -> Types.class_type -> unitval tree_of_class_declaration :
Ident.t ->
Types.class_declaration ->
Types.rec_status ->
Outcometree.out_sig_itemval class_declaration :
Ident.t ->
Format.formatter ->
Types.class_declaration ->
unitval tree_of_cltype_declaration :
Ident.t ->
Types.class_type_declaration ->
Types.rec_status ->
Outcometree.out_sig_itemval cltype_declaration :
Ident.t ->
Format.formatter ->
Types.class_type_declaration ->
unitval type_expansion :
Types.type_expr ->
Format.formatter ->
Types.type_expr ->
unitval prepare_expansion :
(Types.type_expr * Types.type_expr) ->
Types.type_expr * Types.type_exprval report_ambiguous_type_error :
Format.formatter ->
Env.t ->
(Path.t * Path.t) ->
(Path.t * Path.t) list ->
(Format.formatter -> unit) ->
(Format.formatter -> unit) ->
(Format.formatter -> unit) ->
unitval report_unification_error :
Format.formatter ->
Env.t ->
Errortrace.unification Errortrace.t ->
?type_expected_explanation:(Format.formatter -> unit) ->
(Format.formatter -> unit) ->
(Format.formatter -> unit) ->
unitval report_equality_error :
Format.formatter ->
Env.t ->
Errortrace.comparison Errortrace.t ->
(Format.formatter -> unit) ->
(Format.formatter -> unit) ->
unitval report_moregen_error :
Format.formatter ->
Env.t ->
Errortrace.comparison Errortrace.t ->
(Format.formatter -> unit) ->
(Format.formatter -> unit) ->
unitmodule Subtype : sig ... endval print_items :
(Env.t -> Types.signature_item -> 'a option) ->
Env.t ->
Types.signature_item list ->
(Outcometree.out_sig_item * 'a option) listval printed_signature : string -> Format.formatter -> Types.signature -> unitprinted_signature sourcefile ppf sg print the signature sg of sourcefile with potential warnings for name collisions