Ast_helper.Typ
Type expressions
Type expressions
val mk :
?loc:Astlib.Location.t ->
?attrs:Astlib.Ast_500.Parsetree.attribute list ->
Astlib.Ast_500.Parsetree.core_type_desc ->
Astlib.Ast_500.Parsetree.core_type
val any :
?loc:Astlib.Location.t ->
?attrs:Astlib.Ast_500.Parsetree.attribute list ->
unit ->
Astlib.Ast_500.Parsetree.core_type
val var :
?loc:Astlib.Location.t ->
?attrs:Astlib.Ast_500.Parsetree.attribute list ->
string ->
Astlib.Ast_500.Parsetree.core_type
val arrow :
?loc:Astlib.Location.t ->
?attrs:Astlib.Ast_500.Parsetree.attribute list ->
Astlib.Ast_500.Asttypes.arg_label ->
Astlib.Ast_500.Parsetree.core_type ->
Astlib.Ast_500.Parsetree.core_type ->
Astlib.Ast_500.Parsetree.core_type
val tuple :
?loc:Astlib.Location.t ->
?attrs:Astlib.Ast_500.Parsetree.attribute list ->
Astlib.Ast_500.Parsetree.core_type list ->
Astlib.Ast_500.Parsetree.core_type
val constr :
?loc:Astlib.Location.t ->
?attrs:Astlib.Ast_500.Parsetree.attribute list ->
Astlib.Longident.t Astlib.Location.loc ->
Astlib.Ast_500.Parsetree.core_type list ->
Astlib.Ast_500.Parsetree.core_type
val object_ :
?loc:Astlib.Location.t ->
?attrs:Astlib.Ast_500.Parsetree.attribute list ->
Astlib.Ast_500.Parsetree.object_field list ->
Astlib.Ast_500.Asttypes.closed_flag ->
Astlib.Ast_500.Parsetree.core_type
val class_ :
?loc:Astlib.Location.t ->
?attrs:Astlib.Ast_500.Parsetree.attribute list ->
Astlib.Longident.t Astlib.Location.loc ->
Astlib.Ast_500.Parsetree.core_type list ->
Astlib.Ast_500.Parsetree.core_type
val alias :
?loc:Astlib.Location.t ->
?attrs:Astlib.Ast_500.Parsetree.attribute list ->
Astlib.Ast_500.Parsetree.core_type ->
string ->
Astlib.Ast_500.Parsetree.core_type
val variant :
?loc:Astlib.Location.t ->
?attrs:Astlib.Ast_500.Parsetree.attribute list ->
Astlib.Ast_500.Parsetree.row_field list ->
Astlib.Ast_500.Asttypes.closed_flag ->
Astlib.Ast_500.Asttypes.label list option ->
Astlib.Ast_500.Parsetree.core_type
val poly :
?loc:Astlib.Location.t ->
?attrs:Astlib.Ast_500.Parsetree.attribute list ->
string Astlib.Location.loc list ->
Astlib.Ast_500.Parsetree.core_type ->
Astlib.Ast_500.Parsetree.core_type
val package :
?loc:Astlib.Location.t ->
?attrs:Astlib.Ast_500.Parsetree.attribute list ->
Astlib.Longident.t Astlib.Location.loc ->
(Astlib.Longident.t Astlib.Location.loc * Astlib.Ast_500.Parsetree.core_type)
list ->
Astlib.Ast_500.Parsetree.core_type
val extension :
?loc:Astlib.Location.t ->
?attrs:Astlib.Ast_500.Parsetree.attribute list ->
Astlib.Ast_500.Parsetree.extension ->
Astlib.Ast_500.Parsetree.core_type
val force_poly :
Astlib.Ast_500.Parsetree.core_type ->
Astlib.Ast_500.Parsetree.core_type
val varify_constructors :
string Astlib.Location.loc list ->
Astlib.Ast_500.Parsetree.core_type ->
Astlib.Ast_500.Parsetree.core_type
varify_constructors newtypes te
is type expression te
, of which any of nullary type constructor tc
is replaced by type variable of the same name, if tc
's name appears in newtypes
. Raise Syntaxerr.Variable_in_scope
if any type variable inside te
appears in newtypes
.