PrinttypPrinting functions
type namespace := Shape.Sig_component_kind.tval string_of_path : Path.t -> stringPrint a list of paths, using the same naming context to avoid name collisions
val printed_signature :
string ->
Stdlib.Format.formatter ->
Types.signature ->
unitprinted_signature sourcefile ppf sg print the signature sg of sourcefile with potential warnings for name collisions
module type Printers := sig ... endmodule Doc : Printers with type 'a printer := 'a Format_doc.printerFor compatibility with Format printers
include Printers with type 'a printer := 'a Format_doc.format_printerval wrap_printing_env : error:bool -> Env.t -> (unit -> 'a) -> 'aCall the function using the environment for type path shortening This affects all the printing functions below Also, if ~error:true, then disable the loading of cmis
val longident : Longident.t Format_doc.format_printerval ident : Ident.t Format_doc.format_printerval path : Path.t Format_doc.format_printerval type_path : Path.t Format_doc.format_printerPrint a type path taking account of -short-paths. Calls should be within wrap_printing_env.
val type_expr : Types.type_expr Format_doc.format_printerPrint out a type. This will pick names for type variables, and will not reuse names for common type variables shared across multiple type expressions. (It will also reset the printing state, which matters for other type formatters such as prepared_type_expr.) If you want multiple types to use common names for type variables, see Out_type.prepare_for_printing and Out_type.prepared_type_expr.
val type_scheme : Types.type_expr Format_doc.format_printershared_type_scheme is very similar to type_scheme, but does not reset the printing context first. This is intended to be used in cases where the printing should have a particularly wide context, such as documentation generators; most use cases, such as error messages, have narrower contexts for which type_scheme is better suited.
val type_expansion :
Out_type.type_or_scheme ->
Errortrace.expanded_type Format_doc.format_printerval label : Types.label_declaration Format_doc.format_printerval constructor : Types.constructor_declaration Format_doc.format_printerval constructor_arguments :
Types.constructor_arguments Format_doc.format_printerval extension_constructor :
Ident.t ->
Types.extension_constructor Format_doc.format_printerPrints extension constructor with the type signature: type ('a, 'b) bar += A of float
val extension_only_constructor :
Ident.t ->
Types.extension_constructor Format_doc.format_printerPrints only extension constructor without type signature: A of float
val value_description :
Ident.t ->
Types.value_description Format_doc.format_printerval type_declaration :
Ident.t ->
Types.type_declaration Format_doc.format_printerval modtype_declaration :
Ident.t ->
Types.modtype_declaration Format_doc.format_printerval class_declaration :
Ident.t ->
Types.class_declaration Format_doc.format_printerval cltype_declaration :
Ident.t ->
Types.class_type_declaration Format_doc.format_printerval modtype : Types.module_type Format_doc.format_printerval signature : Types.signature Format_doc.format_printerval class_type : Types.class_type Format_doc.format_printer