package ocaml-base-compiler

  1. Overview
  2. Docs
type 'a class_info = {
  1. cls_id : Ident.t;
  2. cls_id_loc : string Asttypes.loc;
  3. cls_decl : Types.class_declaration;
  4. cls_ty_id : Ident.t;
  5. cls_ty_decl : Types.class_type_declaration;
  6. cls_obj_id : Ident.t;
  7. cls_obj_abbr : Types.type_declaration;
  8. cls_typesharp_id : Ident.t;
  9. cls_abbr : Types.type_declaration;
  10. cls_arity : int;
  11. cls_pub_methods : string list;
  12. cls_info : 'a;
}
type class_type_info = {
  1. clsty_ty_id : Ident.t;
  2. clsty_id_loc : string Asttypes.loc;
  3. clsty_ty_decl : Types.class_type_declaration;
  4. clsty_obj_id : Ident.t;
  5. clsty_obj_abbr : Types.type_declaration;
  6. clsty_typesharp_id : Ident.t;
  7. clsty_abbr : Types.type_declaration;
  8. clsty_info : Typedtree.class_type_declaration;
}
val class_type_declarations : Env.t -> Parsetree.class_description list -> class_type_info list * Env.t
val approx_class_declarations : Env.t -> Parsetree.class_description list -> class_type_info list
val virtual_methods : Types.class_signature -> Asttypes.label list
type error =
  1. | Unconsistent_constraint of (Types.type_expr * Types.type_expr) list
  2. | Field_type_mismatch of string * string * (Types.type_expr * Types.type_expr) list
  3. | Structure_expected of Types.class_type
  4. | Cannot_apply of Types.class_type
  5. | Apply_wrong_label of Asttypes.arg_label
  6. | Pattern_type_clash of Types.type_expr
  7. | Repeated_parameter
  8. | Unbound_class_2 of Longident.t
  9. | Unbound_class_type_2 of Longident.t
  10. | Abbrev_type_clash of Types.type_expr * Types.type_expr * Types.type_expr
  11. | Constructor_type_mismatch of string * (Types.type_expr * Types.type_expr) list
  12. | Virtual_class of bool * bool * string list * string list
  13. | Parameter_arity_mismatch of Longident.t * int * int
  14. | Parameter_mismatch of (Types.type_expr * Types.type_expr) list
  15. | Bad_parameters of Ident.t * Types.type_expr * Types.type_expr
  16. | Class_match_failure of Ctype.class_match_failure list
  17. | Unbound_val of string
  18. | Unbound_type_var of Format.formatter -> unit * Ctype.closed_class_failure
  19. | Make_nongen_seltype of Types.type_expr
  20. | Non_generalizable_class of Ident.t * Types.class_declaration
  21. | Cannot_coerce_self of Types.type_expr
  22. | Non_collapsable_conjunction of Ident.t * Types.class_declaration * (Types.type_expr * Types.type_expr) list
  23. | Final_self_clash of (Types.type_expr * Types.type_expr) list
  24. | Mutability_mismatch of string * Asttypes.mutable_flag
  25. | No_overriding of string * string
  26. | Duplicate of string * string
  27. | Closing_self_type of Types.type_expr
exception Error of Location.t * Env.t * error
exception Error_forward of Location.error
val report_error : Env.t -> Format.formatter -> error -> unit
OCaml

Innovation. Community. Security.