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 Errortrace.unification Errortrace.t
  2. | Field_type_mismatch of string * string * Errortrace.unification Errortrace.t
  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 * Errortrace.unification Errortrace.t
  12. | Virtual_class of bool * bool * string list * string list
  13. | Parameter_arity_mismatch of Longident.t * int * int
  14. | Parameter_mismatch of Errortrace.unification Errortrace.t
  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. | Non_generalizable_class of Ident.t * Types.class_declaration
  20. | Cannot_coerce_self of Types.type_expr
  21. | Non_collapsable_conjunction of Ident.t * Types.class_declaration * Errortrace.unification Errortrace.t
  22. | Final_self_clash of Errortrace.unification Errortrace.t
  23. | Mutability_mismatch of string * Asttypes.mutable_flag
  24. | No_overriding of string * string
  25. | Duplicate of string * string
  26. | 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
val type_open_descr : (?used_slot:bool ref -> Env.t -> Parsetree.open_description -> Typedtree.open_description * Env.t) ref
OCaml

Innovation. Community. Security.