package ocaml-base-compiler

  1. Overview
  2. Docs
exception Dont_match
type position = Ctype.Unification_trace.position =
  1. | First
  2. | Second
type label_mismatch =
  1. | Type
  2. | Mutability of position
type record_mismatch =
  1. | Label_mismatch of Types.label_declaration * Types.label_declaration * label_mismatch
  2. | Label_names of int * Ident.t * Ident.t
  3. | Label_missing of position * Ident.t
  4. | Unboxed_float_representation of position
type constructor_mismatch =
  1. | Type
  2. | Arity
  3. | Inline_record of record_mismatch
  4. | Kind of position
  5. | Explicit_return_type of position
type variant_mismatch =
  1. | Constructor_mismatch of Types.constructor_declaration * Types.constructor_declaration * constructor_mismatch
  2. | Constructor_names of int * Ident.t * Ident.t
  3. | Constructor_missing of position * Ident.t
type extension_constructor_mismatch =
  1. | Constructor_privacy
  2. | Constructor_mismatch of Ident.t * Types.extension_constructor * Types.extension_constructor * constructor_mismatch
type type_mismatch =
  1. | Arity
  2. | Privacy
  3. | Kind
  4. | Constraint
  5. | Manifest
  6. | Variance
  7. | Record_mismatch of record_mismatch
  8. | Variant_mismatch of variant_mismatch
  9. | Unboxed_representation of position
  10. | Immediate of Type_immediacy.Violation.t
val type_declarations : ?equality:bool -> loc:Location.t -> Env.t -> mark:bool -> string -> Types.type_declaration -> Path.t -> Types.type_declaration -> type_mismatch option
val extension_constructors : loc:Location.t -> Env.t -> mark:bool -> Ident.t -> Types.extension_constructor -> Types.extension_constructor -> extension_constructor_mismatch option
val report_type_mismatch : string -> string -> string -> Format.formatter -> type_mismatch -> unit
val report_extension_constructor_mismatch : string -> string -> string -> Format.formatter -> extension_constructor_mismatch -> unit
OCaml

Innovation. Community. Security.