aboutsummaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authorGravatar Enrico Tassi <enrico.tassi@inria.fr>2015-03-23 11:04:05 +0100
committerGravatar Enrico Tassi <enrico.tassi@inria.fr>2015-03-23 11:17:15 +0100
commit38708b54882cf5c9de205711b3a962a0febc2e8c (patch)
tree4e8a04a9735c23245853418728961fcf250c8c8c
parent26153f161da2aa85454aece95b7a6d8cd5d446cf (diff)
coqchk: more prints when -debug
-rw-r--r--checker/reduction.ml10
-rw-r--r--checker/safe_typing.ml3
2 files changed, 11 insertions, 2 deletions
diff --git a/checker/reduction.ml b/checker/reduction.ml
index 185c6edfc..28fdb130e 100644
--- a/checker/reduction.ml
+++ b/checker/reduction.ml
@@ -169,7 +169,15 @@ let sort_cmp univ pb s0 s1 =
(match pb with
| CONV -> Univ.check_eq univ u1 u2
| CUMUL -> Univ.check_leq univ u1 u2)
- then raise NotConvertible
+ then begin
+ if !Flags.debug then begin
+ let op = match pb with CONV -> "=" | CUMUL -> "<=" in
+ Printf.eprintf "cort_cmp: %s\n%!" Pp.(string_of_ppcmds
+ (str"Error: " ++ Univ.pr_uni u1 ++ str op ++ Univ.pr_uni u2 ++ str ":" ++ cut()
+ ++ Univ.pr_universes univ))
+ end;
+ raise NotConvertible
+ end
| (_, _) -> raise NotConvertible
let rec no_arg_available = function
diff --git a/checker/safe_typing.ml b/checker/safe_typing.ml
index 35f7f14b6..810d6e0b6 100644
--- a/checker/safe_typing.ml
+++ b/checker/safe_typing.ml
@@ -83,6 +83,7 @@ let import file clib univs digest =
(* When the module is admitted, digests *must* match *)
let unsafe_import file clib univs digest =
let env = !genv in
- check_imports (errorlabstrm"unsafe_import") clib.comp_name env clib.comp_deps;
+ if !Flags.debug then check_imports msg_warning clib.comp_name env clib.comp_deps
+ else check_imports (errorlabstrm"unsafe_import") clib.comp_name env clib.comp_deps;
check_engagement env clib.comp_enga;
full_add_module clib.comp_name clib.comp_mod univs digest