1995-08-09 08:06:35 -07:00
|
|
|
(***********************************************************************)
|
|
|
|
(* *)
|
1996-04-30 07:53:58 -07:00
|
|
|
(* Objective Caml *)
|
1995-08-09 08:06:35 -07:00
|
|
|
(* *)
|
|
|
|
(* Xavier Leroy, projet Cristal, INRIA Rocquencourt *)
|
|
|
|
(* *)
|
1996-04-30 07:53:58 -07:00
|
|
|
(* 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. *)
|
1995-08-09 08:06:35 -07:00
|
|
|
(* *)
|
|
|
|
(***********************************************************************)
|
|
|
|
|
|
|
|
(* $Id$ *)
|
|
|
|
|
1995-07-25 04:40:07 -07:00
|
|
|
(* Typing of type definitions and primitive definitions *)
|
1995-05-04 03:15:53 -07:00
|
|
|
|
1996-09-23 04:33:27 -07:00
|
|
|
open Types
|
2000-03-06 14:12:09 -08:00
|
|
|
open Format
|
1995-05-04 03:15:53 -07:00
|
|
|
|
|
|
|
val transl_type_decl:
|
|
|
|
Env.t -> (string * Parsetree.type_declaration) list ->
|
|
|
|
(Ident.t * type_declaration) list * Env.t
|
|
|
|
val transl_exception:
|
|
|
|
Env.t -> Parsetree.exception_declaration -> exception_declaration
|
|
|
|
|
2000-03-12 05:10:29 -08:00
|
|
|
val transl_exn_rebind:
|
|
|
|
Env.t -> Location.t -> Longident.t -> Path.t * exception_declaration
|
|
|
|
|
1995-07-25 04:40:07 -07:00
|
|
|
val transl_value_decl:
|
|
|
|
Env.t -> Parsetree.value_description -> value_description
|
1995-09-28 03:42:38 -07:00
|
|
|
|
|
|
|
val transl_with_constraint:
|
|
|
|
Env.t -> Parsetree.type_declaration -> type_declaration
|
2000-09-06 03:21:07 -07:00
|
|
|
|
2003-06-19 08:53:53 -07:00
|
|
|
val abstract_type_decl: int -> type_declaration
|
|
|
|
val approx_type_decl:
|
|
|
|
Env.t -> (string * Parsetree.type_declaration) list ->
|
|
|
|
(Ident.t * type_declaration) list
|
2003-07-01 06:05:43 -07:00
|
|
|
val check_recmod_typedecl:
|
|
|
|
Env.t -> Location.t -> Ident.t list -> Path.t -> type_declaration -> unit
|
2003-06-19 08:53:53 -07:00
|
|
|
|
2000-09-06 03:21:07 -07:00
|
|
|
(* for typeclass.ml *)
|
|
|
|
val compute_variance_decls:
|
|
|
|
Env.t ->
|
2000-09-07 03:57:32 -07:00
|
|
|
((Ident.t * type_declaration) * ((bool * bool) list * Location.t)) list ->
|
|
|
|
(Ident.t * type_declaration) list
|
1995-07-25 04:40:07 -07:00
|
|
|
|
1995-05-04 03:15:53 -07:00
|
|
|
type error =
|
|
|
|
Repeated_parameter
|
|
|
|
| Duplicate_constructor of string
|
1995-05-22 08:43:44 -07:00
|
|
|
| Too_many_constructors
|
1995-05-04 03:15:53 -07:00
|
|
|
| Duplicate_label of string
|
|
|
|
| Recursive_abbrev of string
|
1995-09-26 13:23:29 -07:00
|
|
|
| Definition_mismatch of type_expr
|
2000-05-24 01:19:02 -07:00
|
|
|
| Constraint_failed of type_expr * type_expr
|
2001-12-25 19:43:41 -08:00
|
|
|
| Unconsistent_constraint of (type_expr * type_expr) list
|
1997-02-20 12:39:02 -08:00
|
|
|
| Type_clash of (type_expr * type_expr) list
|
2003-07-01 06:05:43 -07:00
|
|
|
| Parameters_differ of Path.t * type_expr * type_expr
|
1997-05-13 07:07:00 -07:00
|
|
|
| Null_arity_external
|
2000-06-05 05:18:30 -07:00
|
|
|
| Missing_native_external
|
1998-06-24 12:22:26 -07:00
|
|
|
| Unbound_type_var
|
2000-03-12 05:10:29 -08:00
|
|
|
| Unbound_exception of Longident.t
|
|
|
|
| Not_an_exception of Longident.t
|
2000-09-07 03:57:32 -07:00
|
|
|
| Bad_variance
|
2001-09-28 15:55:27 -07:00
|
|
|
| Unavailable_type_constructor of Path.t
|
1995-05-04 03:15:53 -07:00
|
|
|
|
|
|
|
exception Error of Location.t * error
|
|
|
|
|
2000-03-06 14:12:09 -08:00
|
|
|
val report_error: formatter -> error -> unit
|