forked from ocaml/ocaml
-
Notifications
You must be signed in to change notification settings - Fork 6
/
Copy pathcmi_format.mli
44 lines (33 loc) · 1.59 KB
/
cmi_format.mli
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
(***********************************************************************)
(* *)
(* OCaml *)
(* *)
(* Fabrice Le Fessant, INRIA Saclay *)
(* *)
(* Copyright 2012 Institut National de Recherche en Informatique et *)
(* en Automatique. All rights reserved. This file is distributed *)
(* under the terms of the Q Public License version 1.0. *)
(* *)
(***********************************************************************)
type pers_flags = Rectypes
type cmi_infos = {
cmi_name : string;
cmi_sign : Types.signature_item list;
cmi_crcs : (string * Digest.t option) list;
cmi_flags : pers_flags list;
}
(* write the magic + the cmi information *)
val output_cmi : string -> out_channel -> cmi_infos -> Digest.t
val create_cmi : ?check_exists:unit -> string -> cmi_infos -> Digest.t
(* read the cmi information (the magic is supposed to have already been read) *)
val input_cmi : in_channel -> cmi_infos
(* read a cmi from a filename, checking the magic *)
val read_cmi : string -> cmi_infos
(* Error report *)
type error =
Not_an_interface of string
| Wrong_version_interface of string * string
| Corrupted_interface of string
exception Error of error
open Format
val report_error: formatter -> error -> unit