jon.recoil.org

Module Ocaml_parsing.Pprintast

Pretty-printers for Parsetree

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

type space_formatter = (unit, Stdlib.Format.formatter, unit) Stdlib.format
val string_of_expression : Ocaml_parsing.Parsetree.expression -> string
val string_of_structure : Ocaml_parsing.Parsetree.structure -> string
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 "_".

val ident_of_name : Stdlib.Format.formatter -> string -> unit
val needs_parens : string -> bool