1996-04-22 04:15:41 -07:00
|
|
|
(***********************************************************************)
|
|
|
|
(* *)
|
2011-07-27 07:17:02 -07:00
|
|
|
(* OCaml *)
|
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
|
|
|
(* *)
|
|
|
|
(***********************************************************************)
|
|
|
|
|
|
|
|
open Asttypes
|
1996-09-23 04:33:27 -07:00
|
|
|
open Types
|
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 ->
|
2012-05-30 07:52:37 -07:00
|
|
|
(Ident.t * string loc * class_declaration *
|
|
|
|
Ident.t * class_type_declaration *
|
1998-06-24 12:22:26 -07:00
|
|
|
Ident.t * type_declaration *
|
|
|
|
Ident.t * type_declaration *
|
2012-05-30 07:52:37 -07:00
|
|
|
int * string list * Typedtree.class_declaration) list * Env.t
|
|
|
|
|
|
|
|
(*
|
|
|
|
and class_declaration =
|
|
|
|
(class_expr, Types.class_declaration) class_infos
|
|
|
|
*)
|
1998-06-24 12:22:26 -07:00
|
|
|
|
|
|
|
val class_descriptions:
|
|
|
|
Env.t -> Parsetree.class_description list ->
|
2012-05-30 07:52:37 -07:00
|
|
|
(Ident.t * string loc * class_declaration *
|
|
|
|
Ident.t * class_type_declaration *
|
1998-06-24 12:22:26 -07:00
|
|
|
Ident.t * type_declaration *
|
|
|
|
Ident.t * type_declaration *
|
2012-05-30 07:52:37 -07:00
|
|
|
int * string list * Typedtree.class_description) list * Env.t
|
|
|
|
|
|
|
|
(*
|
|
|
|
and class_description =
|
|
|
|
(class_type, unit) class_infos
|
|
|
|
*)
|
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 ->
|
2012-05-30 07:52:37 -07:00
|
|
|
(Ident.t * string loc * class_type_declaration *
|
|
|
|
Ident.t * type_declaration *
|
1998-06-24 12:22:26 -07:00
|
|
|
Ident.t * type_declaration *
|
2012-05-30 07:52:37 -07:00
|
|
|
Typedtree.class_type_declaration) list * Env.t
|
|
|
|
|
|
|
|
(*
|
|
|
|
and class_type_declaration =
|
|
|
|
(class_type, Types.class_type_declaration) class_infos
|
|
|
|
*)
|
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 ->
|
2012-05-30 07:52:37 -07:00
|
|
|
(Ident.t * string loc * class_type_declaration *
|
|
|
|
Ident.t * type_declaration *
|
2003-06-19 08:53:53 -07:00
|
|
|
Ident.t * type_declaration *
|
2012-05-30 07:52:37 -07:00
|
|
|
Typedtree.class_type_declaration) list
|
2003-06-19 08:53:53 -07:00
|
|
|
|
2003-11-30 16:32:11 -08:00
|
|
|
val virtual_methods: Types.class_signature -> label list
|
|
|
|
|
2012-05-30 07:52:37 -07:00
|
|
|
(*
|
|
|
|
val type_classes :
|
|
|
|
bool ->
|
|
|
|
('a -> Types.type_expr) ->
|
|
|
|
(Env.t -> 'a -> 'b * Types.class_type) ->
|
|
|
|
Env.t ->
|
|
|
|
'a Parsetree.class_infos list ->
|
|
|
|
( Ident.t * Types.class_declaration *
|
|
|
|
Ident.t * Types.class_type_declaration *
|
|
|
|
Ident.t * Types.type_declaration *
|
|
|
|
Ident.t * Types.type_declaration *
|
|
|
|
int * string list * 'b * 'b Typedtree.class_infos)
|
|
|
|
list * Env.t
|
|
|
|
*)
|
|
|
|
|
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
|
2013-09-17 04:28:33 -07:00
|
|
|
| Virtual_class of bool * 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
|
2013-06-07 08:35:43 -07:00
|
|
|
| Duplicate of string * string
|
1996-04-22 04:15:41 -07:00
|
|
|
|
2012-01-21 19:15:14 -08:00
|
|
|
exception Error of Location.t * Env.t * error
|
2014-05-07 01:26:17 -07:00
|
|
|
exception Error_forward of Location.error
|
1996-04-22 04:15:41 -07:00
|
|
|
|
2012-01-21 19:15:14 -08:00
|
|
|
val report_error : Env.t -> formatter -> error -> unit
|