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 *)
|
|
|
|
(* Automatique. Distributed only by permission. *)
|
|
|
|
(* *)
|
|
|
|
(***********************************************************************)
|
|
|
|
|
|
|
|
(* $Id$ *)
|
|
|
|
|
|
|
|
open Asttypes
|
1996-09-23 04:33:27 -07:00
|
|
|
open Types
|
1996-04-22 04:15:41 -07:00
|
|
|
open Typedtree
|
|
|
|
|
|
|
|
val transl_classes:
|
|
|
|
Env.t -> Parsetree.class_def list ->
|
|
|
|
(Ident.t * class_type * Ident.t * type_declaration *
|
|
|
|
Ident.t * type_declaration * class_def) list * Env.t
|
|
|
|
val transl_class_types:
|
|
|
|
Env.t -> Parsetree.class_type list ->
|
|
|
|
(Ident.t * class_type * Ident.t * type_declaration *
|
|
|
|
Ident.t * type_declaration) list * Env.t
|
|
|
|
|
|
|
|
|
|
|
|
type error =
|
|
|
|
Duplicate_method of string
|
|
|
|
| Duplicate_variable of string
|
|
|
|
| Duplicate_super_variable of string
|
|
|
|
| Repeated_parameter
|
|
|
|
| Virtual_class of string * string
|
|
|
|
| Closed_class of string
|
|
|
|
| Closed_ancestor of string * Path.t * string
|
1997-02-20 12:39:02 -08:00
|
|
|
| Non_generalizable of Ident.t * type_expr list
|
1996-05-26 06:42:34 -07:00
|
|
|
| Non_closed of Ident.t * type_expr list * type_expr *
|
|
|
|
Ctype.closed_schema_result
|
1996-04-22 04:15:41 -07:00
|
|
|
| Mutable_var of string
|
|
|
|
| Undefined_var of string
|
1996-05-20 09:43:29 -07:00
|
|
|
| Variable_type_mismatch of string * (type_expr * type_expr) list
|
|
|
|
| Method_type_mismatch of string * (type_expr * type_expr) list
|
1996-04-22 04:15:41 -07:00
|
|
|
| Unconsistent_constraint
|
|
|
|
| Unbound_class of Longident.t
|
1996-05-20 09:43:29 -07:00
|
|
|
| Argument_type_mismatch of (type_expr * type_expr) list
|
1996-04-22 04:15:41 -07:00
|
|
|
| Abbrev_type_clash of type_expr * type_expr * type_expr
|
|
|
|
| Bad_parameters of Ident.t * type_expr * type_expr
|
|
|
|
| Illdefined_class of string
|
|
|
|
| Argument_arity_mismatch of Path.t * int * int
|
|
|
|
| Parameter_arity_mismatch of Path.t * int * int
|
1996-05-20 09:43:29 -07:00
|
|
|
| Parameter_mismatch of (type_expr * type_expr) list
|
1996-04-22 04:15:41 -07:00
|
|
|
|
|
|
|
exception Error of Location.t * error
|
|
|
|
|
|
|
|
val report_error : error -> unit
|