From a01a60b366307da3eca63c9937984db6f273dc41 Mon Sep 17 00:00:00 2001 From: Pierre-Marie Pédrot Date: Mon, 25 Nov 2013 22:30:02 +0100 Subject: Getting rid of casted_open_constr. It was only used by the refine tactic, which now uses plain glob_constr's. Now there is no real need to depend on goal when interpreting genargs. Possible minor incompatibilities: 1. The interpretation of glob_constr to constr is now done by Goal.constr_of_raw, which may be slightly dumbier than the dedicated Tacinterp.interp_open_constr which tries harder. Stdlib and test-suite do go through, though. 2. I had to change the parsing level of wit_glob in Extraargs from lconstr to constr. It may break ML notations using glob, but as they are only used inside Coq code and all well-parenthezised, it should be OK. --- printing/pptactic.ml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'printing/pptactic.ml') diff --git a/printing/pptactic.ml b/printing/pptactic.ml index e1324c3ee2..f091a2e1dd 100644 --- a/printing/pptactic.ml +++ b/printing/pptactic.ml @@ -158,7 +158,7 @@ let rec pr_raw_generic prc prlc prtac prpat prref (x:Genarg.rlevel Genarg.generi | RedExprArgType -> pr_red_expr (prc,prlc,pr_or_by_notation prref,prpat) (out_gen (rawwit wit_red_expr) x) - | OpenConstrArgType b -> prc (snd (out_gen (rawwit (wit_open_constr_gen b)) x)) + | OpenConstrArgType -> prc (snd (out_gen (rawwit wit_open_constr) x)) | ConstrWithBindingsArgType -> pr_with_bindings prc prlc (out_gen (rawwit wit_constr_with_bindings) x) | BindingsArgType -> @@ -196,7 +196,7 @@ let rec pr_glb_generic prc prlc prtac prpat x = pr_red_expr (prc,prlc,pr_or_var (pr_and_short_name pr_evaluable_reference),prpat) (out_gen (glbwit wit_red_expr) x) - | OpenConstrArgType b -> prc (snd (out_gen (glbwit (wit_open_constr_gen b)) x)) + | OpenConstrArgType -> prc (snd (out_gen (glbwit wit_open_constr) x)) | ConstrWithBindingsArgType -> pr_with_bindings prc prlc (out_gen (glbwit wit_constr_with_bindings) x) | BindingsArgType -> @@ -227,7 +227,7 @@ let rec pr_top_generic prc prlc prtac prpat x = | RedExprArgType -> pr_red_expr (prc,prlc,pr_evaluable_reference,prpat) (out_gen (topwit wit_red_expr) x) - | OpenConstrArgType b -> prc (snd (out_gen (topwit (wit_open_constr_gen b)) x)) + | OpenConstrArgType -> prc (snd (out_gen (topwit wit_open_constr) x)) | ConstrWithBindingsArgType -> let (c,b) = (out_gen (topwit wit_constr_with_bindings) x).Evd.it in pr_with_bindings prc prlc (c,b) -- cgit v1.2.3 From cb290d81c46ec370e303e1414e203c40c8fa1174 Mon Sep 17 00:00:00 2001 From: Pierre-Marie Pédrot Date: Sun, 1 Dec 2013 18:47:55 +0100 Subject: Removing RefArgType generic argument. --- printing/pptactic.ml | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) (limited to 'printing/pptactic.ml') diff --git a/printing/pptactic.ml b/printing/pptactic.ml index f091a2e1dd..77f5db3b4c 100644 --- a/printing/pptactic.ml +++ b/printing/pptactic.ml @@ -148,7 +148,6 @@ let rec pr_raw_generic prc prlc prtac prpat prref (x:Genarg.rlevel Genarg.generi | IntOrVarArgType -> pr_or_var int (out_gen (rawwit wit_int_or_var) x) | IdentArgType b -> if_pattern_ident b pr_id (out_gen (rawwit wit_ident) x) | VarArgType -> pr_located pr_id (out_gen (rawwit wit_var) x) - | RefArgType -> prref (out_gen (rawwit wit_ref) x) | GenArgType -> pr_raw_generic prc prlc prtac prpat prref (out_gen (rawwit wit_genarg) x) | ConstrArgType -> prc (out_gen (rawwit wit_constr) x) | ConstrMayEvalArgType -> @@ -183,7 +182,6 @@ let rec pr_glb_generic prc prlc prtac prpat x = | IntOrVarArgType -> pr_or_var int (out_gen (glbwit wit_int_or_var) x) | IdentArgType b -> if_pattern_ident b pr_id (out_gen (glbwit wit_ident) x) | VarArgType -> pr_located pr_id (out_gen (glbwit wit_var) x) - | RefArgType -> pr_or_var (pr_located pr_global) (out_gen (glbwit wit_ref) x) | GenArgType -> pr_glb_generic prc prlc prtac prpat (out_gen (glbwit wit_genarg) x) | ConstrArgType -> prc (out_gen (glbwit wit_constr) x) | ConstrMayEvalArgType -> @@ -219,7 +217,6 @@ let rec pr_top_generic prc prlc prtac prpat x = | IntOrVarArgType -> pr_or_var int (out_gen (topwit wit_int_or_var) x) | IdentArgType b -> if_pattern_ident b pr_id (out_gen (topwit wit_ident) x) | VarArgType -> pr_id (out_gen (topwit wit_var) x) - | RefArgType -> pr_global (out_gen (topwit wit_ref) x) | GenArgType -> pr_top_generic prc prlc prtac prpat (out_gen (topwit wit_genarg) x) | ConstrArgType -> prc (out_gen (topwit wit_constr) x) | ConstrMayEvalArgType -> prc (out_gen (topwit wit_constr_may_eval) x) @@ -1032,6 +1029,8 @@ let register_uniform_printer wit pr = Genprint.register_print0 wit pr pr pr let () = + Genprint.register_print0 Constrarg.wit_ref + pr_reference (pr_or_var (pr_located pr_global)) pr_global; Genprint.register_print0 Constrarg.wit_intro_pattern pr_intro_pattern pr_intro_pattern pr_intro_pattern; Genprint.register_print0 Constrarg.wit_sort -- cgit v1.2.3