1(**************************************************************************)
2(*                                                                        *)
3(*                                 OCaml                                  *)
4(*                                                                        *)
5(*             Xavier Leroy, projet Cristal, INRIA Rocquencourt           *)
6(*                                                                        *)
7(*   Copyright 1996 Institut National de Recherche en Informatique et     *)
8(*     en Automatique.                                                    *)
9(*                                                                        *)
10(*   All rights reserved.  This file is distributed under the terms of    *)
11(*   the GNU Lesser General Public License version 2.1, with the          *)
12(*   special exception on linking described in the file LICENSE.          *)
13(*                                                                        *)
14(**************************************************************************)
15
16(* Predefined type constructors (with special typing rules in typecore) *)
17
18open Types
19
20val type_int: type_expr
21val type_char: type_expr
22val type_string: type_expr
23val type_bytes: type_expr
24val type_float: type_expr
25val type_bool: type_expr
26val type_unit: type_expr
27val type_exn: type_expr
28val type_array: type_expr -> type_expr
29val type_list: type_expr -> type_expr
30val type_option: type_expr -> type_expr
31val type_nativeint: type_expr
32val type_int32: type_expr
33val type_int64: type_expr
34val type_lazy_t: type_expr -> type_expr
35val type_extension_constructor:type_expr
36
37val path_int: Path.t
38val path_char: Path.t
39val path_string: Path.t
40val path_bytes: Path.t
41val path_float: Path.t
42val path_bool: Path.t
43val path_unit: Path.t
44val path_exn: Path.t
45val path_array: Path.t
46val path_list: Path.t
47val path_option: Path.t
48val path_nativeint: Path.t
49val path_int32: Path.t
50val path_int64: Path.t
51val path_lazy_t: Path.t
52val path_extension_constructor: Path.t
53
54val path_match_failure: Path.t
55val path_assert_failure : Path.t
56val path_undefined_recursive_module : Path.t
57
58(* To build the initial environment. Since there is a nasty mutual
59   recursion between predef and env, we break it by parameterizing
60   over Env.t, Env.add_type and Env.add_extension. *)
61
62val build_initial_env:
63  (Ident.t -> type_declaration -> 'a -> 'a) ->
64  (Ident.t -> extension_constructor -> 'a -> 'a) ->
65  'a -> 'a * 'a
66
67(* To initialize linker tables *)
68
69val builtin_values: (string * Ident.t) list
70val builtin_idents: (string * Ident.t) list
71
72(** All predefined exceptions, exposed as [Ident.t] for flambda (for
73    building value approximations).
74    The [Ident.t] for division by zero is also exported explicitly
75    so flambda can generate code to raise it. *)
76val ident_division_by_zero: Ident.t
77val all_predef_exns : Ident.t list
78