Module Melange_compiler_libs.Datarepr

let constructor_has_optional_shape: Types.constructor_description => bool;
let extension_descr: current_unit:string => Path.t => Types.extension_constructor => Types.constructor_description;
let labels_of_type: Path.t => Types.type_declaration => list((Ident.t, Types.label_description));
let constructors_of_type: current_unit:string => Path.t => Types.type_declaration => list((Ident.t, Types.constructor_description));
exception Constr_not_found;
let constructor_existentials: Types.constructor_arguments => option(Types.type_expr) => (list(Types.type_expr), list(Types.type_expr));

Takes cd_args and cd_res from a constructor_declaration and returns:

  • the types of the constructor's arguments
  • the existential variables introduced by the constructor