Module Pprintast

Pretty-printers for Parsetree

Warning: this module is unstable and part of compiler-libs.

type space_formatter = (unit, Stdlib.Format.formatter, unit) format
val longident : Stdlib.Format.formatter -> Longident.t -> unit
val constr : Stdlib.Format.formatter -> Longident.t -> unit
val expression : Stdlib.Format.formatter -> Parsetree.expression -> unit
val string_of_expression : Parsetree.expression -> string
val core_type : Stdlib.Format.formatter -> Parsetree.core_type -> unit
val signature : Stdlib.Format.formatter -> Parsetree.signature -> unit
val structure : Stdlib.Format.formatter -> Parsetree.structure -> unit
val string_of_structure : Parsetree.structure -> string
val module_expr : Stdlib.Format.formatter -> Parsetree.module_expr -> unit
val toplevel_phrase : Stdlib.Format.formatter -> Parsetree.toplevel_phrase -> unit
val class_field : Stdlib.Format.formatter -> Parsetree.class_field -> unit
val class_type_field : Stdlib.Format.formatter -> Parsetree.class_type_field -> unit
val class_expr : Stdlib.Format.formatter -> Parsetree.class_expr -> unit
val class_type : Stdlib.Format.formatter -> Parsetree.class_type -> unit
val module_type : Stdlib.Format.formatter -> Parsetree.module_type -> unit
val structure_item : Stdlib.Format.formatter -> Parsetree.structure_item -> unit
val signature_item : Stdlib.Format.formatter -> Parsetree.signature_item -> unit
val tyvar_of_name : string -> string

Turn a type variable name into a valid identifier, taking care of the special treatment required for the single quote character in second position, or for keywords by escaping them with \#. No-op on "_".

val tyvar : Stdlib.Format.formatter -> string -> unit

Print a type variable name as a valid identifier, taking care of the special treatment required for the single quote character in second position, or for keywords by escaping them with \#. No-op on "_".

module Doc : sig ... end

Format_doc functions for error messages