1995-08-09 08:06:35 -07:00
|
|
|
(***********************************************************************)
|
|
|
|
(* *)
|
2011-07-27 07:17:02 -07:00
|
|
|
(* OCaml *)
|
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:
|
2005-03-22 19:08:37 -08:00
|
|
|
Env.t -> (string * Parsetree.type_declaration) list ->
|
1995-05-04 03:15:53 -07:00
|
|
|
(Ident.t * type_declaration) list * Env.t
|
|
|
|
val transl_exception:
|
2012-03-06 11:03:17 -08:00
|
|
|
Env.t -> Location.t -> Parsetree.exception_declaration -> exception_declaration
|
1995-05-04 03:15:53 -07:00
|
|
|
|
2000-03-12 05:10:29 -08:00
|
|
|
val transl_exn_rebind:
|
2005-03-22 19:08:37 -08:00
|
|
|
Env.t -> Location.t -> Longident.t -> Path.t * exception_declaration
|
2000-03-12 05:10:29 -08:00
|
|
|
|
1995-07-25 04:40:07 -07:00
|
|
|
val transl_value_decl:
|
2011-10-20 20:26:35 -07:00
|
|
|
Env.t -> Location.t -> Parsetree.value_description -> value_description
|
1995-09-28 03:42:38 -07:00
|
|
|
|
|
|
|
val transl_with_constraint:
|
2011-07-20 02:17:07 -07:00
|
|
|
Env.t -> Ident.t -> Path.t option -> type_declaration ->
|
2006-11-01 17:10:04 -08:00
|
|
|
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:
|
2005-03-22 19:08:37 -08:00
|
|
|
Env.t -> (string * Parsetree.type_declaration) list ->
|
2003-06-19 08:53:53 -07:00
|
|
|
(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
|
|
|
|
2007-10-09 03:29:37 -07:00
|
|
|
(* for fixed types *)
|
|
|
|
val is_fixed_type : Parsetree.type_declaration -> bool
|
|
|
|
|
2000-09-06 03:21:07 -07:00
|
|
|
(* for typeclass.ml *)
|
|
|
|
val compute_variance_decls:
|
|
|
|
Env.t ->
|
2004-12-09 04:40:53 -08:00
|
|
|
(Ident.t * type_declaration * type_declaration * class_declaration *
|
|
|
|
cltype_declaration * ((bool * bool) list * Location.t)) list ->
|
|
|
|
(type_declaration * type_declaration * class_declaration *
|
|
|
|
cltype_declaration) list
|
2010-01-22 04:48:24 -08: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
|
2010-05-20 20:36:52 -07:00
|
|
|
| Definition_mismatch of type_expr * Includecore.type_mismatch list
|
2000-05-24 01:19:02 -07:00
|
|
|
| Constraint_failed of type_expr * type_expr
|
2010-10-18 22:24:36 -07:00
|
|
|
| Inconsistent_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
|
2005-08-13 13:59:37 -07:00
|
|
|
| Unbound_type_var of type_expr * type_declaration
|
2000-03-12 05:10:29 -08:00
|
|
|
| Unbound_exception of Longident.t
|
|
|
|
| Not_an_exception of Longident.t
|
2005-08-13 13:59:37 -07:00
|
|
|
| Bad_variance of int * (bool*bool) * (bool*bool)
|
2001-09-28 15:55:27 -07:00
|
|
|
| Unavailable_type_constructor of Path.t
|
2005-03-22 19:08:37 -08:00
|
|
|
| Bad_fixed_type of string
|
2009-07-20 04:51:50 -07:00
|
|
|
| Unbound_type_var_exc of type_expr * type_expr
|
2010-11-07 22:59:46 -08:00
|
|
|
| Varying_anonymous
|
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
|