Skip to content

Commit 38708b5

Browse files
committed
coqchk: more prints when -debug
1 parent 26153f1 commit 38708b5

File tree

2 files changed

+11
-2
lines changed

2 files changed

+11
-2
lines changed

checker/reduction.ml

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -169,7 +169,15 @@ let sort_cmp univ pb s0 s1 =
169169
(match pb with
170170
| CONV -> Univ.check_eq univ u1 u2
171171
| CUMUL -> Univ.check_leq univ u1 u2)
172-
then raise NotConvertible
172+
then begin
173+
if !Flags.debug then begin
174+
let op = match pb with CONV -> "=" | CUMUL -> "<=" in
175+
Printf.eprintf "cort_cmp: %s\n%!" Pp.(string_of_ppcmds
176+
(str"Error: " ++ Univ.pr_uni u1 ++ str op ++ Univ.pr_uni u2 ++ str ":" ++ cut()
177+
++ Univ.pr_universes univ))
178+
end;
179+
raise NotConvertible
180+
end
173181
| (_, _) -> raise NotConvertible
174182

175183
let rec no_arg_available = function

checker/safe_typing.ml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -83,6 +83,7 @@ let import file clib univs digest =
8383
(* When the module is admitted, digests *must* match *)
8484
let unsafe_import file clib univs digest =
8585
let env = !genv in
86-
check_imports (errorlabstrm"unsafe_import") clib.comp_name env clib.comp_deps;
86+
if !Flags.debug then check_imports msg_warning clib.comp_name env clib.comp_deps
87+
else check_imports (errorlabstrm"unsafe_import") clib.comp_name env clib.comp_deps;
8788
check_engagement env clib.comp_enga;
8889
full_add_module clib.comp_name clib.comp_mod univs digest

0 commit comments

Comments
 (0)