File tree Expand file tree Collapse file tree 1 file changed +17
-7
lines changed Expand file tree Collapse file tree 1 file changed +17
-7
lines changed Original file line number Diff line number Diff line change 12
12
#directory "lib";;
13
13
#directory "kernel";;
14
14
#directory "checker";;
15
+ #directory "+threads";;
15
16
#directory "+camlp4";;
16
17
#directory "+camlp5";;
17
18
18
19
#load "unix.cma";;
20
+ #load"threads.cma";;
19
21
#load "str.cma";;
20
22
#load "gramlib.cma";;
21
23
(*#load "toplevellib.cma";;
@@ -29,12 +31,14 @@ open Typeops;;
29
31
open Check;;
30
32
31
33
open Pp;;
34
+ open Errors;;
32
35
open Util;;
33
36
open Names;;
34
37
open Term;;
35
38
open Environ;;
36
39
open Declarations;;
37
40
open Mod_checking;;
41
+ open Cic;;
38
42
39
43
let pr_id id = str(string_of_id id)
40
44
let pr_na = function Name id -> pr_id id | _ -> str"_";;
@@ -111,21 +115,31 @@ let prsub s =
111
115
(*#install_printer prenvu;;
112
116
#install_printer prsub;;*)
113
117
114
- Checker.init_with_argv [|""|];;
118
+ Checker.init_with_argv [|"";"-coqlib";"." |];;
115
119
Flags.make_silent false;;
116
120
Flags.debug := true;;
117
121
Sys.catch_break true;;
118
122
119
123
let module_of_file f =
120
124
let (_,mb,_,_) = Obj.magic ((intern_from_file f).library_compiled) in
121
- (mb:module_body)
125
+ (mb:Cic. module_body)
122
126
;;
127
+ let deref_mod md s =
128
+ let l = match md.mod_expr with
129
+ Struct(NoFunctor l) -> l
130
+ | FullStruct ->
131
+ (match md.mod_type with
132
+ NoFunctor l -> l)
133
+ in
134
+ List.assoc (label_of_id(id_of_string s)) l
135
+ ;;
136
+ (*
123
137
let mod_access m fld =
124
138
match m.mod_expr with
125
139
Some(SEBstruct l) -> List.assoc fld l
126
140
| _ -> failwith "bad structure type"
127
141
;;
128
-
142
+ *)
129
143
let parse_dp s =
130
144
make_dirpath(List.rev_map id_of_string (Str.split(Str.regexp"\\.") s))
131
145
;;
@@ -160,10 +174,6 @@ let read_mod s f =
160
174
(dir_path * Digest.t) list *
161
175
engagement option);;
162
176
163
- let deref_mod md s =
164
- let (Some (SEBstruct l)) = md.mod_expr in
165
- List.assoc (label_of_id(id_of_string s)) l
166
- ;;
167
177
168
178
let expln f x =
169
179
try f x
You can’t perform that action at this time.
0 commit comments