模块 Ast_helper.Typ

module Typ: sig .. end

类型表达式


val mk : ?loc:Ast_helper.loc ->
?attrs:Ast_helper.attrs -> Parsetree.core_type_desc -> Parsetree.core_type
val attr : Parsetree.core_type -> Parsetree.attribute -> Parsetree.core_type
val any : ?loc:Ast_helper.loc -> ?attrs:Ast_helper.attrs -> unit -> Parsetree.core_type
val var : ?loc:Ast_helper.loc ->
?attrs:Ast_helper.attrs -> string -> Parsetree.core_type
val arrow : ?loc:Ast_helper.loc ->
?attrs:Ast_helper.attrs ->
Asttypes.arg_label ->
Parsetree.core_type -> Parsetree.core_type -> Parsetree.core_type
val tuple : ?loc:Ast_helper.loc ->
?attrs:Ast_helper.attrs -> Parsetree.core_type list -> Parsetree.core_type
val constr : ?loc:Ast_helper.loc ->
?attrs:Ast_helper.attrs ->
Ast_helper.lid -> Parsetree.core_type list -> Parsetree.core_type
val object_ : ?loc:Ast_helper.loc ->
?attrs:Ast_helper.attrs ->
Parsetree.object_field list -> Asttypes.closed_flag -> Parsetree.core_type
val class_ : ?loc:Ast_helper.loc ->
?attrs:Ast_helper.attrs ->
Ast_helper.lid -> Parsetree.core_type list -> Parsetree.core_type
val alias : ?loc:Ast_helper.loc ->
?attrs:Ast_helper.attrs ->
Parsetree.core_type -> string Ast_helper.with_loc -> Parsetree.core_type
val variant : ?loc:Ast_helper.loc ->
?attrs:Ast_helper.attrs ->
Parsetree.row_field list ->
Asttypes.closed_flag -> Asttypes.label list option -> Parsetree.core_type
val poly : ?loc:Ast_helper.loc ->
?attrs:Ast_helper.attrs ->
Ast_helper.str list -> Parsetree.core_type -> Parsetree.core_type
val package : ?loc:Ast_helper.loc ->
?attrs:Ast_helper.attrs ->
Ast_helper.lid ->
(Ast_helper.lid * Parsetree.core_type) list -> Parsetree.core_type
val open_ : ?loc:Ast_helper.loc ->
?attrs:Ast_helper.attrs ->
Ast_helper.lid -> Parsetree.core_type -> Parsetree.core_type
val extension : ?loc:Ast_helper.loc ->
?attrs:Ast_helper.attrs -> Parsetree.extension -> Parsetree.core_type
val force_poly : Parsetree.core_type -> Parsetree.core_type
val varify_constructors : Ast_helper.str list -> Parsetree.core_type -> Parsetree.core_type

varify_constructors newtypes te 是类型表达式 te,其中任何空类型构造函数 tc 都会被相同名称的类型变量替换,如果 tc 的名称出现在 newtypes 中。如果 te 中的任何类型变量出现在 newtypes 中,则引发 Syntaxerr.Variable_in_scope