aboutsummaryrefslogtreecommitdiffhomepage
path: root/checker/safe_typing.mli
blob: 78107455c4a8ea2a3a404f70f20f30f95d45a208 (plain)
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
(************************************************************************)
(*  v      *   The Coq Proof Assistant  /  The Coq Development Team     *)
(* <O___,, *   INRIA - CNRS - LIX - LRI - PPS - Copyright 1999-2010     *)
(*   \VV/  **************************************************************)
(*    //   *      This file is distributed under the terms of the       *)
(*         *       GNU Lesser General Public License Version 2.1        *)
(************************************************************************)

(*i*)
open Names
open Term
open Environ
(*i*)

val reset : unit -> unit
val get_env : unit -> env

(* exporting and importing modules *)
type compiled_library

val set_engagement : Declarations.engagement -> unit
val import         :
  System.physical_path -> compiled_library -> Digest.t -> unit
val unsafe_import  :
  System.physical_path -> compiled_library -> Digest.t -> unit

(** Store the body of modules' opaque constants inside a table. 

    This module is used during the serialization and deserialization
    of vo files. 
*)
module LightenLibrary :
sig
  type table 
  type lightened_compiled_library 

  (** [save] splits a library into a lightened library with indexes
      and a table that maps these indexes to opaque terms. *)
  val save : compiled_library -> lightened_compiled_library * table

  (** [load lpf get_table lcl] builds a compiled library from a
      lightened library [lcl] by remplacing every index by its related
      opaque terms inside the table obtained by [get_table ()].  
      If [lpf] is unset then the table is considered empty, which 
      implies that [get_table] is not evaluated and every index 
      is replaced by [None] inside the compiled library. *)
  val load : load_proof:bool -> (unit -> table) 
    -> lightened_compiled_library -> compiled_library
end