模組 Pprintast

module Pprintast: sig .. end

用於 Parsetree 的美觀列印器

警告:此模組不穩定,屬於 compiler-libs 的一部分。


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

將型別變數名稱轉換為有效的識別符號,並處理第二個位置的單引號字元,或是使用 \# 跳脫關鍵字所需的特殊處理。對 "_" 不執行任何操作。

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

將型別變數名稱列印為有效的識別符號,並處理第二個位置的單引號字元,或是使用 \# 跳脫關鍵字所需的特殊處理。對 "_" 不執行任何操作。