jon.recoil.org

Module Ast_helper.TypSource

Type expressions

Sourceval any : ?loc:loc -> ?attrs:attrs -> Parsetree.jkind_annotation option -> Parsetree.core_type
Sourceval var : ?loc:loc -> ?attrs:attrs -> string -> Parsetree.jkind_annotation option -> Parsetree.core_type
Sourceval tuple : ?loc:loc -> ?attrs:attrs -> (string option * Parsetree.core_type) list -> Parsetree.core_type
Sourceval unboxed_tuple : ?loc:loc -> ?attrs:attrs -> (string option * Parsetree.core_type) list -> Parsetree.core_type
Sourceval constr : ?loc:loc -> ?attrs:attrs -> lid -> Parsetree.core_type list -> Parsetree.core_type
Sourceval class_ : ?loc:loc -> ?attrs:attrs -> lid -> Parsetree.core_type list -> Parsetree.core_type
Sourceval alias : ?loc:loc -> ?attrs:attrs -> Parsetree.core_type -> string with_loc option -> Parsetree.jkind_annotation option -> Parsetree.core_type
Sourceval variant : ?loc:loc -> ?attrs:attrs -> Parsetree.row_field list -> Asttypes.closed_flag -> Asttypes.label list option -> Parsetree.core_type
Sourceval poly : ?loc:loc -> ?attrs:attrs -> (str * Parsetree.jkind_annotation option) list -> Parsetree.core_type -> Parsetree.core_type
Sourceval package : ?loc:loc -> ?attrs:attrs -> lid -> (lid * Parsetree.core_type) list -> Parsetree.core_type
Sourceval open_ : ?loc:loc -> ?attrs:attrs -> lid -> Parsetree.core_type -> Parsetree.core_type
Sourceval quote : ?loc:loc -> ?attrs:attrs -> Parsetree.core_type -> Parsetree.core_type
Sourceval splice : ?loc:loc -> ?attrs:attrs -> Parsetree.core_type -> Parsetree.core_type
Sourceval repr : ?loc:loc -> ?attrs:attrs -> str list -> Parsetree.core_type -> Parsetree.core_type
Sourceval newlayout : ?loc:loc -> ?attrs:attrs -> str list -> Parsetree.core_type -> Parsetree.core_type
Sourceval extension : ?loc:loc -> ?attrs:attrs -> Parsetree.extension -> Parsetree.core_type
Sourceval varify_constructors : str list -> Parsetree.core_type -> 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. Used to translate type a. a -> a to 'a. 'a -> 'a during parsing.

  • since 4.05