Skip to content
This repository
tag: v1836
Fetching contributors…

Cannot retrieve contributors at this time

file 68 lines (56 sloc) 2.226 kb
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68
(*
Copyright © 2011 MLstate

This file is part of OPA.

OPA is free software: you can redistribute it and/or modify it under the
terms of the GNU Affero General Public License, version 3, as published by
the Free Software Foundation.

OPA is distributed in the hope that it will be useful, but WITHOUT ANY
WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for
more details.

You should have received a copy of the GNU Affero General Public License
along with OPA. If not, see <http://www.gnu.org/licenses/>.
*)
(**
Alpha renaming on the SurfaceAst
*)

(**
The warning produced by this pass.
Applications are free to load are not these warnings.
*)
val warning_set : WarningClass.Set.t

val get_tuple_int_map : unit -> Ident.t IntMap.t
(**
[get_tuple_int_map] returns a map containing a binding from each [n]
to the the identifier [tuple_n] (since these types are defined implicitely)
*)

val set_tuple_int_map : Ident.t IntMap.t -> unit
(**
temporary, meant for separate compilation while the linking is between
checkDuplication and insertTupleTypes
*)

type env
(**
The renaming environment
*)

val init_env : string list -> string list -> env
(**
[init_env names types] initializes the environment with the given list of names
and list of types.
It allows to use names in the standard library and insert their defininitions
during the compilation (like the version number of the compiler for instance)
*)

val code :
  env -> (* the initial environment *)
  (string, SurfaceAst.renaming_directive) SurfaceAst.code -> (* the code to be renamed*)
    env * (* the final environment *)
    (Ident.t, SurfaceAst.dependency_directive) SurfaceAst.code (* the renamed code *)
(**
The main function that renames all the identifiers in the code: identifiers, type identifiers,
type variables.
*)

val save_env : env -> unit
val load_env : env -> env
val get_exported_values : env -> IdentSet.t

module ObjectType : ObjectFiles.R with type t = (Ident.t * FilePos.pos) StringMap.t and type 'a wrapper = 'a
val extract_types_in_scope : env -> ObjectType.t
Something went wrong with that request. Please try again.