Module Ast_helper.Typ

module Typ: sig .. end

Type expressions


let mk:
  (
    ~loc: Ast_helper.loc=?,
    ~attrs: Ast_helper.attrs=?,
    Parsetree.core_type_desc
  ) =>
  Parsetree.core_type;
let attr: (Parsetree.core_type, Parsetree.attribute) => Parsetree.core_type;
let any:
  (~loc: Ast_helper.loc=?, ~attrs: Ast_helper.attrs=?, unit) =>
  Parsetree.core_type;
let var:
  (~loc: Ast_helper.loc=?, ~attrs: Ast_helper.attrs=?, string) =>
  Parsetree.core_type;
let arrow:
  (
    ~loc: Ast_helper.loc=?,
    ~attrs: Ast_helper.attrs=?,
    Asttypes.arg_label,
    Parsetree.core_type,
    Parsetree.core_type
  ) =>
  Parsetree.core_type;
let tuple:
  (
    ~loc: Ast_helper.loc=?,
    ~attrs: Ast_helper.attrs=?,
    list(Parsetree.core_type)
  ) =>
  Parsetree.core_type;
let constr:
  (
    ~loc: Ast_helper.loc=?,
    ~attrs: Ast_helper.attrs=?,
    Ast_helper.lid,
    list(Parsetree.core_type)
  ) =>
  Parsetree.core_type;
let object_:
  (
    ~loc: Ast_helper.loc=?,
    ~attrs: Ast_helper.attrs=?,
    list(Parsetree.object_field),
    Asttypes.closed_flag
  ) =>
  Parsetree.core_type;
let class_:
  (
    ~loc: Ast_helper.loc=?,
    ~attrs: Ast_helper.attrs=?,
    Ast_helper.lid,
    list(Parsetree.core_type)
  ) =>
  Parsetree.core_type;
let alias:
  (
    ~loc: Ast_helper.loc=?,
    ~attrs: Ast_helper.attrs=?,
    Parsetree.core_type,
    string
  ) =>
  Parsetree.core_type;
let variant:
  (
    ~loc: Ast_helper.loc=?,
    ~attrs: Ast_helper.attrs=?,
    list(Parsetree.row_field),
    Asttypes.closed_flag,
    option(list(Asttypes.label))
  ) =>
  Parsetree.core_type;
let poly:
  (
    ~loc: Ast_helper.loc=?,
    ~attrs: Ast_helper.attrs=?,
    list(Ast_helper.str),
    Parsetree.core_type
  ) =>
  Parsetree.core_type;
let package:
  (
    ~loc: Ast_helper.loc=?,
    ~attrs: Ast_helper.attrs=?,
    Ast_helper.lid,
    list((Ast_helper.lid, Parsetree.core_type))
  ) =>
  Parsetree.core_type;
let extension:
  (~loc: Ast_helper.loc=?, ~attrs: Ast_helper.attrs=?, Parsetree.extension) =>
  Parsetree.core_type;
let force_poly: Parsetree.core_type => Parsetree.core_type;
let varify_constructors:
  (list(Ast_helper.str), 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.