1996-04-22 04:15:41 -07:00
|
|
|
(***********************************************************************)
|
|
|
|
(* *)
|
1996-04-30 07:53:58 -07:00
|
|
|
(* Objective Caml *)
|
1996-04-22 04:15:41 -07:00
|
|
|
(* *)
|
|
|
|
(* Jerome Vouillon, projet Cristal, INRIA Rocquencourt *)
|
|
|
|
(* *)
|
|
|
|
(* Copyright 1996 Institut National de Recherche en Informatique et *)
|
1999-11-17 10:59:06 -08:00
|
|
|
(* en Automatique. All rights reserved. This file is distributed *)
|
|
|
|
(* under the terms of the Q Public License version 1.0. *)
|
1996-04-22 04:15:41 -07:00
|
|
|
(* *)
|
|
|
|
(***********************************************************************)
|
|
|
|
|
|
|
|
(* $Id$ *)
|
|
|
|
|
|
|
|
open Asttypes
|
1996-09-23 04:33:27 -07:00
|
|
|
open Types
|
1996-04-22 04:15:41 -07:00
|
|
|
open Typedtree
|
2000-03-06 14:12:09 -08:00
|
|
|
open Format
|
1996-04-22 04:15:41 -07:00
|
|
|
|
1998-06-24 12:22:26 -07:00
|
|
|
val class_declarations:
|
|
|
|
Env.t -> Parsetree.class_declaration list ->
|
|
|
|
(Ident.t * class_declaration *
|
|
|
|
Ident.t * cltype_declaration *
|
|
|
|
Ident.t * type_declaration *
|
|
|
|
Ident.t * type_declaration *
|
|
|
|
int * string list * class_expr) list * Env.t
|
|
|
|
|
|
|
|
val class_descriptions:
|
|
|
|
Env.t -> Parsetree.class_description list ->
|
|
|
|
(Ident.t * class_declaration *
|
|
|
|
Ident.t * cltype_declaration *
|
|
|
|
Ident.t * type_declaration *
|
|
|
|
Ident.t * type_declaration *
|
|
|
|
int * string list * class_type) list * Env.t
|
1996-04-22 04:15:41 -07:00
|
|
|
|
1998-06-24 12:22:26 -07:00
|
|
|
val class_type_declarations:
|
|
|
|
Env.t -> Parsetree.class_description list ->
|
|
|
|
(Ident.t * cltype_declaration *
|
|
|
|
Ident.t * type_declaration *
|
|
|
|
Ident.t * type_declaration) list * Env.t
|
1996-04-22 04:15:41 -07:00
|
|
|
|
2003-06-19 08:53:53 -07:00
|
|
|
val approx_class_declarations:
|
|
|
|
Env.t -> Parsetree.class_description list ->
|
|
|
|
(Ident.t * cltype_declaration *
|
|
|
|
Ident.t * type_declaration *
|
|
|
|
Ident.t * type_declaration) list
|
|
|
|
|
2003-11-30 16:32:11 -08:00
|
|
|
val virtual_methods: Types.class_signature -> label list
|
|
|
|
|
1996-04-22 04:15:41 -07:00
|
|
|
type error =
|
1998-06-24 12:22:26 -07:00
|
|
|
Unconsistent_constraint of (type_expr * type_expr) list
|
2006-04-04 19:28:13 -07:00
|
|
|
| Field_type_mismatch of string * string * (type_expr * type_expr) list
|
1998-06-24 12:22:26 -07:00
|
|
|
| Structure_expected of class_type
|
|
|
|
| Cannot_apply of class_type
|
1999-11-30 08:07:38 -08:00
|
|
|
| Apply_wrong_label of label
|
1998-06-24 12:22:26 -07:00
|
|
|
| Pattern_type_clash of type_expr
|
|
|
|
| Repeated_parameter
|
|
|
|
| Unbound_class_2 of Longident.t
|
|
|
|
| Unbound_class_type_2 of Longident.t
|
1996-04-22 04:15:41 -07:00
|
|
|
| Abbrev_type_clash of type_expr * type_expr * type_expr
|
1998-06-24 12:22:26 -07:00
|
|
|
| Constructor_type_mismatch of string * (type_expr * type_expr) list
|
2006-04-04 19:28:13 -07:00
|
|
|
| Virtual_class of bool * string list * string list
|
1998-06-24 12:22:26 -07:00
|
|
|
| Parameter_arity_mismatch of Longident.t * int * int
|
1996-05-20 09:43:29 -07:00
|
|
|
| Parameter_mismatch of (type_expr * type_expr) list
|
1998-06-24 12:22:26 -07:00
|
|
|
| Bad_parameters of Ident.t * type_expr * type_expr
|
|
|
|
| Class_match_failure of Ctype.class_match_failure list
|
|
|
|
| Unbound_val of string
|
2000-03-06 14:12:09 -08:00
|
|
|
| Unbound_type_var of (formatter -> unit) * Ctype.closed_class_failure
|
1998-06-24 12:22:26 -07:00
|
|
|
| Make_nongen_seltype of type_expr
|
1998-08-17 09:03:33 -07:00
|
|
|
| Non_generalizable_class of Ident.t * Types.class_declaration
|
2001-11-05 01:12:59 -08:00
|
|
|
| Cannot_coerce_self of type_expr
|
2002-10-07 23:55:58 -07:00
|
|
|
| Non_collapsable_conjunction of
|
|
|
|
Ident.t * Types.class_declaration * (type_expr * type_expr) list
|
2003-11-25 01:20:45 -08:00
|
|
|
| Final_self_clash of (type_expr * type_expr) list
|
2006-04-04 19:28:13 -07:00
|
|
|
| Mutability_mismatch of string * mutable_flag
|
2010-04-07 20:58:41 -07:00
|
|
|
| No_overriding of string * string
|
1996-04-22 04:15:41 -07:00
|
|
|
|
|
|
|
exception Error of Location.t * error
|
|
|
|
|
2000-03-06 14:12:09 -08:00
|
|
|
val report_error : formatter -> error -> unit
|