aboutsummaryrefslogtreecommitdiffhomepage
path: root/interp
diff options
context:
space:
mode:
authorGravatar herbelin <herbelin@85f007b7-540e-0410-9357-904b9bb8a0f7>2006-12-12 10:44:56 +0000
committerGravatar herbelin <herbelin@85f007b7-540e-0410-9357-904b9bb8a0f7>2006-12-12 10:44:56 +0000
commit518ff68fd367cd3e68d60692aa23ae47087d6342 (patch)
treec2d3c9f224cec09d76ab17bf79ec74fa0e136686 /interp
parent85adaa69f841003dfe0c4431884db1cc4db3473b (diff)
Variable print_instances pour déboguer les instances d'evar
git-svn-id: svn+ssh://scm.gforge.inria.fr/svn/coq/trunk@9441 85f007b7-540e-0410-9357-904b9bb8a0f7
Diffstat (limited to 'interp')
-rw-r--r--interp/constrextern.ml19
-rw-r--r--interp/constrextern.mli1
2 files changed, 12 insertions, 8 deletions
diff --git a/interp/constrextern.ml b/interp/constrextern.ml
index d38662294..85ca1fac4 100644
--- a/interp/constrextern.ml
+++ b/interp/constrextern.ml
@@ -63,6 +63,9 @@ let print_projections = ref false
let print_meta_as_hole = ref false
+(* This forces printing of evar instances *)
+let print_instances = ref false
+
let with_arguments f = Options.with_option print_arguments f
let with_implicits f = Options.with_option print_implicits f
let with_coercions f = Options.with_option print_coercions f
@@ -101,13 +104,7 @@ let idopt_of_name = function
| Name id -> Some id
| Anonymous -> None
-let extern_evar loc n =
-(*
- msgerrnl (str
- "Warning: existential variable turned into meta-variable during externalization");
- CPatVar (loc,(false,make_ident "META" (Some n)))
-*)
- CEvar (loc,n)
+let extern_evar loc n = CEvar (loc,n)
let raw_string_of_ref = function
| ConstRef kn ->
@@ -641,7 +638,13 @@ let rec extern inctx scopes vars r =
| REvar (loc,n,None) when !print_meta_as_hole -> CHole loc
- | REvar (loc,n,_) -> (* we drop args *) extern_evar loc n
+ | REvar (loc,n,args) ->
+ if !print_instances & args <> None then
+ explicitize loc false [] (None,extern_evar loc n)
+ (List.map (sub_extern true scopes vars) (out_some args))
+ else
+ (* we drop args *)
+ extern_evar loc n
| RPatVar (loc,n) -> if !print_meta_as_hole then CHole loc else CPatVar (loc,n)
diff --git a/interp/constrextern.mli b/interp/constrextern.mli
index 0ffb8c333..f4843756e 100644
--- a/interp/constrextern.mli
+++ b/interp/constrextern.mli
@@ -51,6 +51,7 @@ val print_coercions : bool ref
val print_universes : bool ref
val print_no_symbol : bool ref
val print_projections : bool ref
+val print_instances : bool ref
(* This governs printing of implicit arguments. If [with_implicits] is
on and not [with_arguments] then implicit args are printed prefixed