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
|
|
|
(* *)
|
|
|
|
(***********************************************************************)
|
|
|
|
|
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:
|
2013-03-06 03:47:59 -08:00
|
|
|
Env.t -> Parsetree.type_declaration list ->
|
2013-03-25 11:20:11 -07:00
|
|
|
Typedtree.type_declaration list * Env.t
|
2012-05-31 01:07:31 -07:00
|
|
|
|
1995-05-04 03:15:53 -07:00
|
|
|
val transl_exception:
|
2014-05-04 16:08:45 -07:00
|
|
|
Env.t ->
|
|
|
|
Parsetree.extension_constructor -> Typedtree.extension_constructor * Env.t
|
1995-05-04 03:15:53 -07:00
|
|
|
|
2014-05-04 16:08:45 -07:00
|
|
|
val transl_type_extension:
|
|
|
|
bool -> Env.t -> Location.t -> Parsetree.type_extension ->
|
|
|
|
Typedtree.type_extension * Env.t
|
2000-03-12 05:10:29 -08:00
|
|
|
|
1995-07-25 04:40:07 -07:00
|
|
|
val transl_value_decl:
|
2012-05-31 01:07:31 -07:00
|
|
|
Env.t -> Location.t ->
|
2013-03-25 11:04:40 -07:00
|
|
|
Parsetree.value_description -> Typedtree.value_description * Env.t
|
1995-09-28 03:42:38 -07:00
|
|
|
|
2012-05-31 01:07:31 -07:00
|
|
|
val transl_with_constraint:
|
|
|
|
Env.t -> Ident.t -> Path.t option -> Types.type_declaration ->
|
|
|
|
Parsetree.type_declaration -> Typedtree.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:
|
2013-03-06 03:47:59 -08:00
|
|
|
Env.t -> 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
|
2013-05-03 07:40:11 -07:00
|
|
|
val check_coherence:
|
|
|
|
Env.t -> Location.t -> Ident.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 *)
|
2012-05-31 01:07:31 -07:00
|
|
|
val compute_variance_decls:
|
|
|
|
Env.t ->
|
|
|
|
(Ident.t * Types.type_declaration * Types.type_declaration *
|
|
|
|
Types.class_declaration * Types.class_type_declaration *
|
|
|
|
'a Typedtree.class_infos) list ->
|
|
|
|
(Types.type_declaration * Types.type_declaration *
|
|
|
|
Types.class_declaration * Types.class_type_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
|
2014-08-22 06:45:02 -07:00
|
|
|
| Cycle_in_def of string * type_expr
|
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
|
2012-01-21 19:15:14 -08:00
|
|
|
| Inconsistent_constraint of Env.t * (type_expr * type_expr) list
|
|
|
|
| Type_clash of Env.t * (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
|
2014-05-04 16:08:45 -07:00
|
|
|
| Not_open_type of Path.t
|
|
|
|
| Not_extensible_type of Path.t
|
|
|
|
| Extension_mismatch of Path.t * Includecore.type_mismatch list
|
|
|
|
| Rebind_wrong_type of Longident.t * Env.t * (type_expr * type_expr) list
|
|
|
|
| Rebind_mismatch of Longident.t * Path.t * Path.t
|
|
|
|
| Rebind_private of Longident.t
|
2013-04-29 22:26:57 -07:00
|
|
|
| Bad_variance of int * (bool*bool*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
|
2014-05-04 16:08:45 -07:00
|
|
|
| Unbound_type_var_ext of type_expr * extension_constructor
|
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
|