Skip to content

Commit fb6bee0

Browse files
committed
updated include file for debugging
1 parent ed93de7 commit fb6bee0

File tree

1 file changed

+17
-7
lines changed

1 file changed

+17
-7
lines changed

checker/include

Lines changed: 17 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -12,10 +12,12 @@
1212
#directory "lib";;
1313
#directory "kernel";;
1414
#directory "checker";;
15+
#directory "+threads";;
1516
#directory "+camlp4";;
1617
#directory "+camlp5";;
1718

1819
#load "unix.cma";;
20+
#load"threads.cma";;
1921
#load "str.cma";;
2022
#load "gramlib.cma";;
2123
(*#load "toplevellib.cma";;
@@ -29,12 +31,14 @@ open Typeops;;
2931
open Check;;
3032

3133
open Pp;;
34+
open Errors;;
3235
open Util;;
3336
open Names;;
3437
open Term;;
3538
open Environ;;
3639
open Declarations;;
3740
open Mod_checking;;
41+
open Cic;;
3842

3943
let pr_id id = str(string_of_id id)
4044
let pr_na = function Name id -> pr_id id | _ -> str"_";;
@@ -111,21 +115,31 @@ let prsub s =
111115
(*#install_printer prenvu;;
112116
#install_printer prsub;;*)
113117

114-
Checker.init_with_argv [|""|];;
118+
Checker.init_with_argv [|"";"-coqlib";"."|];;
115119
Flags.make_silent false;;
116120
Flags.debug := true;;
117121
Sys.catch_break true;;
118122

119123
let module_of_file f =
120124
let (_,mb,_,_) = Obj.magic ((intern_from_file f).library_compiled) in
121-
(mb:module_body)
125+
(mb:Cic.module_body)
122126
;;
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+
(*
123137
let mod_access m fld =
124138
match m.mod_expr with
125139
Some(SEBstruct l) -> List.assoc fld l
126140
| _ -> failwith "bad structure type"
127141
;;
128-
142+
*)
129143
let parse_dp s =
130144
make_dirpath(List.rev_map id_of_string (Str.split(Str.regexp"\\.") s))
131145
;;
@@ -160,10 +174,6 @@ let read_mod s f =
160174
(dir_path * Digest.t) list *
161175
engagement option);;
162176

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-
;;
167177

168178
let expln f x =
169179
try f x

0 commit comments

Comments
 (0)