Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Newer
Older
100644 69 lines (56 sloc) 2.226 kB
fccc685 Initial open-source release
MLstate authored
1 (*
2 Copyright © 2011 MLstate
3
4 This file is part of OPA.
5
6 OPA is free software: you can redistribute it and/or modify it under the
7 terms of the GNU Affero General Public License, version 3, as published by
8 the Free Software Foundation.
9
10 OPA is distributed in the hope that it will be useful, but WITHOUT ANY
11 WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
12 FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for
13 more details.
14
15 You should have received a copy of the GNU Affero General Public License
16 along with OPA. If not, see <http://www.gnu.org/licenses/>.
17 *)
18 (**
19 Alpha renaming on the SurfaceAst
20 *)
21
22 (**
23 The warning produced by this pass.
24 Applications are free to load are not these warnings.
25 *)
26 val warning_set : WarningClass.Set.t
27
28 val get_tuple_int_map : unit -> Ident.t IntMap.t
29 (**
30 [get_tuple_int_map] returns a map containing a binding from each [n]
31 to the the identifier [tuple_n] (since these types are defined implicitely)
32 *)
33
34 val set_tuple_int_map : Ident.t IntMap.t -> unit
35 (**
36 temporary, meant for separate compilation while the linking is between
37 checkDuplication and insertTupleTypes
38 *)
39
40 type env
41 (**
42 The renaming environment
43 *)
44
45 val init_env : string list -> string list -> env
46 (**
47 [init_env names types] initializes the environment with the given list of names
48 and list of types.
49 It allows to use names in the standard library and insert their defininitions
50 during the compilation (like the version number of the compiler for instance)
51 *)
52
53 val code :
54 env -> (* the initial environment *)
55 (string, SurfaceAst.renaming_directive) SurfaceAst.code -> (* the code to be renamed*)
56 env * (* the final environment *)
57 (Ident.t, SurfaceAst.dependency_directive) SurfaceAst.code (* the renamed code *)
58 (**
59 The main function that renames all the identifiers in the code: identifiers, type identifiers,
60 type variables.
61 *)
62
63 val save_env : env -> unit
64 val load_env : env -> env
65 val get_exported_values : env -> IdentSet.t
66
67 module ObjectType : ObjectFiles.R with type t = (Ident.t * FilePos.pos) StringMap.t and type 'a wrapper = 'a
68 val extract_types_in_scope : env -> ObjectType.t
Something went wrong with that request. Please try again.