From 420f78b2caeaaddc6fe484565b2d0e49c66888e5 Mon Sep 17 00:00:00 2001 From: Stephane Glondu Date: Sun, 27 Jul 2014 10:02:38 +0200 Subject: Imported Upstream version 8.4pl4dfsg --- parsing/argextend.ml4 | 8 ++++---- parsing/egrammar.ml | 2 +- parsing/egrammar.mli | 2 +- parsing/extend.ml | 2 +- parsing/extend.mli | 2 +- parsing/extrawit.ml | 2 +- parsing/extrawit.mli | 2 +- parsing/g_constr.ml4 | 2 +- parsing/g_ltac.ml4 | 2 +- parsing/g_prim.ml4 | 2 +- parsing/g_proofs.ml4 | 2 +- parsing/g_tactic.ml4 | 7 +++++-- parsing/g_vernac.ml4 | 5 +++-- parsing/g_xml.ml4 | 2 +- parsing/lexer.ml4 | 2 +- parsing/lexer.mli | 2 +- parsing/pcoq.ml4 | 8 +++++--- parsing/pcoq.mli | 3 ++- parsing/ppconstr.ml | 2 +- parsing/ppconstr.mli | 2 +- parsing/pptactic.ml | 8 ++++---- parsing/pptactic.mli | 2 +- parsing/ppvernac.ml | 2 +- parsing/ppvernac.mli | 2 +- parsing/prettyp.ml | 2 +- parsing/prettyp.mli | 2 +- parsing/printer.ml | 10 +++++----- parsing/printer.mli | 2 +- parsing/printmod.ml | 2 +- parsing/printmod.mli | 2 +- parsing/q_constr.ml4 | 2 +- parsing/q_coqast.ml4 | 4 ++-- parsing/q_util.ml4 | 2 +- parsing/q_util.mli | 2 +- parsing/tacextend.ml4 | 2 +- parsing/tactic_printer.ml | 2 +- parsing/tactic_printer.mli | 2 +- parsing/tok.ml | 2 +- parsing/tok.mli | 2 +- parsing/vernacextend.ml4 | 2 +- 40 files changed, 62 insertions(+), 55 deletions(-) (limited to 'parsing') diff --git a/parsing/argextend.ml4 b/parsing/argextend.ml4 index 214a6b98..1fc429c6 100644 --- a/parsing/argextend.ml4 +++ b/parsing/argextend.ml4 @@ -1,6 +1,6 @@ (************************************************************************) (* v * The Coq Proof Assistant / The Coq Development Team *) -(* <:expr< Genarg.rawwit_constr_may_eval >> | QuantHypArgType -> <:expr< Genarg.rawwit_quant_hyp >> | RedExprArgType -> <:expr< Genarg.rawwit_red_expr >> - | OpenConstrArgType b -> <:expr< Genarg.rawwit_open_constr_gen $mlexpr_of_bool b$ >> + | OpenConstrArgType (b1,b2) -> <:expr< Genarg.rawwit_open_constr_gen ($mlexpr_of_bool b1$,$mlexpr_of_bool b2$) >> | ConstrWithBindingsArgType -> <:expr< Genarg.rawwit_constr_with_bindings >> | BindingsArgType -> <:expr< Genarg.rawwit_bindings >> | List0ArgType t -> <:expr< Genarg.wit_list0 $make_rawwit loc t$ >> @@ -62,7 +62,7 @@ let rec make_globwit loc = function | ConstrArgType -> <:expr< Genarg.globwit_constr >> | ConstrMayEvalArgType -> <:expr< Genarg.globwit_constr_may_eval >> | RedExprArgType -> <:expr< Genarg.globwit_red_expr >> - | OpenConstrArgType b -> <:expr< Genarg.globwit_open_constr_gen $mlexpr_of_bool b$ >> + | OpenConstrArgType (b1,b2) -> <:expr< Genarg.globwit_open_constr_gen ($mlexpr_of_bool b1$,$mlexpr_of_bool b2$) >> | ConstrWithBindingsArgType -> <:expr< Genarg.globwit_constr_with_bindings >> | BindingsArgType -> <:expr< Genarg.globwit_bindings >> | List0ArgType t -> <:expr< Genarg.wit_list0 $make_globwit loc t$ >> @@ -92,7 +92,7 @@ let rec make_wit loc = function | ConstrArgType -> <:expr< Genarg.wit_constr >> | ConstrMayEvalArgType -> <:expr< Genarg.wit_constr_may_eval >> | RedExprArgType -> <:expr< Genarg.wit_red_expr >> - | OpenConstrArgType b -> <:expr< Genarg.wit_open_constr_gen $mlexpr_of_bool b$ >> + | OpenConstrArgType (b1,b2) -> <:expr< Genarg.wit_open_constr_gen ($mlexpr_of_bool b1$,$mlexpr_of_bool b2$) >> | ConstrWithBindingsArgType -> <:expr< Genarg.wit_constr_with_bindings >> | BindingsArgType -> <:expr< Genarg.wit_bindings >> | List0ArgType t -> <:expr< Genarg.wit_list0 $make_wit loc t$ >> diff --git a/parsing/egrammar.ml b/parsing/egrammar.ml index 12359776..6deb7622 100644 --- a/parsing/egrammar.ml +++ b/parsing/egrammar.ml @@ -1,6 +1,6 @@ (************************************************************************) (* v * The Coq Proof Assistant / The Coq Development Team *) -(* ((),c) ] ] ; + open_constr_wTC: + [ [ c = constr -> ((),c) ] ] + ; casted_open_constr: [ [ c = constr -> ((),c) ] ] ; diff --git a/parsing/g_vernac.ml4 b/parsing/g_vernac.ml4 index 301370e7..75cd7d67 100644 --- a/parsing/g_vernac.ml4 +++ b/parsing/g_vernac.ml4 @@ -1,6 +1,6 @@ (************************************************************************) (* v * The Coq Proof Assistant / The Coq Development Team *) -(* VernacImport (false,qidl) | IDENT "Export"; qidl = LIST1 global -> VernacImport (true,qidl) - | IDENT "Include"; e = module_expr_inl; l = LIST0 ext_module_expr -> + | IDENT "Include"; e = module_type_inl; l = LIST0 ext_module_expr -> VernacInclude(e::l) | IDENT "Include"; "Type"; e = module_type_inl; l = LIST0 ext_module_type -> Flags.if_verbose @@ -842,6 +842,7 @@ GEXTEND Gram -> PrintCoercionPaths (s,t) | IDENT "Canonical"; IDENT "Projections" -> PrintCanonicalConversions | IDENT "Tables" -> PrintTables + | IDENT "Options" -> PrintTables (* A Synonymous to Tables *) | IDENT "Hint" -> PrintHintGoal | IDENT "Hint"; qid = smart_global -> PrintHint qid | IDENT "Hint"; "*" -> PrintHintDb diff --git a/parsing/g_xml.ml4 b/parsing/g_xml.ml4 index 869674f4..6f5e378a 100644 --- a/parsing/g_xml.ml4 +++ b/parsing/g_xml.ml4 @@ -1,6 +1,6 @@ (************************************************************************) (* v * The Coq Proof Assistant / The Coq Development Team *) -(* Gram.entry table *) (* Typically for tactic user extensions *) let open_constr = - make_gen_entry utactic (rawwit_open_constr_gen false) "open_constr" + make_gen_entry utactic (rawwit_open_constr_gen (false,false)) "open_constr" let casted_open_constr = - make_gen_entry utactic (rawwit_open_constr_gen true) "casted_open_constr" + make_gen_entry utactic (rawwit_open_constr_gen (true,false)) "casted_open_constr" + let open_constr_wTC = + make_gen_entry utactic (rawwit_open_constr_gen (false,true)) "open_constr_wTC" let constr_with_bindings = make_gen_entry utactic rawwit_constr_with_bindings "constr_with_bindings" let bindings = diff --git a/parsing/pcoq.mli b/parsing/pcoq.mli index 53c317c0..1b04b117 100644 --- a/parsing/pcoq.mli +++ b/parsing/pcoq.mli @@ -1,6 +1,6 @@ (************************************************************************) (* v * The Coq Proof Assistant / The Coq Development Team *) -(* pr_red_expr (prc,prlc,pr_or_by_notation prref,prpat) (out_gen rawwit_red_expr x) - | OpenConstrArgType b -> prc (snd (out_gen (rawwit_open_constr_gen b) x)) + | OpenConstrArgType (b1,b2) -> prc (snd (out_gen (rawwit_open_constr_gen (b1,b2)) x)) | ConstrWithBindingsArgType -> pr_with_bindings prc prlc (out_gen rawwit_constr_with_bindings x) | BindingsArgType -> @@ -195,7 +195,7 @@ let rec pr_glob_generic prc prlc prtac prpat x = pr_red_expr (prc,prlc,pr_or_var (pr_and_short_name pr_evaluable_reference),prpat) (out_gen globwit_red_expr x) - | OpenConstrArgType b -> prc (snd (out_gen (globwit_open_constr_gen b) x)) + | OpenConstrArgType (b1,b2) -> prc (snd (out_gen (globwit_open_constr_gen (b1,b2)) x)) | ConstrWithBindingsArgType -> pr_with_bindings prc prlc (out_gen globwit_constr_with_bindings x) | BindingsArgType -> @@ -236,7 +236,7 @@ let rec pr_generic prc prlc prtac prpat x = | RedExprArgType -> pr_red_expr (prc,prlc,pr_evaluable_reference,prpat) (out_gen wit_red_expr x) - | OpenConstrArgType b -> prc (snd (out_gen (wit_open_constr_gen b) x)) + | OpenConstrArgType (b1,b2) -> prc (snd (out_gen (wit_open_constr_gen (b1,b2)) x)) | ConstrWithBindingsArgType -> let (c,b) = (out_gen wit_constr_with_bindings x).Evd.it in pr_with_bindings prc prlc (c,b) diff --git a/parsing/pptactic.mli b/parsing/pptactic.mli index 0f82071d..c5953da1 100644 --- a/parsing/pptactic.mli +++ b/parsing/pptactic.mli @@ -1,6 +1,6 @@ (************************************************************************) (* v * The Coq Proof Assistant / The Coq Development Team *) -(* (mt ()) | Some c -> (* Force evaluation *) - let pb = pr_lconstr_env env c in + let pb = pr_lconstr_core true env c in let pb = if isCast c then surround pb else pb in (str" := " ++ pb ++ cut () ) in - let pt = pr_ltype_env env typ in + let pt = pr_ltype_core true env typ in let ptyp = (str" : " ++ pt) in (pr_id id ++ hov 0 (pbody ++ ptyp)) @@ -217,10 +217,10 @@ let pr_rel_decl env (na,c,typ) = | None -> mt () | Some c -> (* Force evaluation *) - let pb = pr_lconstr_env env c in + let pb = pr_lconstr_core true env c in let pb = if isCast c then surround pb else pb in (str":=" ++ spc () ++ pb ++ spc ()) in - let ptyp = pr_ltype_env env typ in + let ptyp = pr_ltype_core true env typ in match na with | Anonymous -> hov 0 (str"<>" ++ spc () ++ pbody ++ str":" ++ spc () ++ ptyp) | Name id -> hov 0 (pr_id id ++ spc () ++ pbody ++ str":" ++ spc () ++ ptyp) diff --git a/parsing/printer.mli b/parsing/printer.mli index 3abe90e7..c0ef1932 100644 --- a/parsing/printer.mli +++ b/parsing/printer.mli @@ -1,6 +1,6 @@ (************************************************************************) (* v * The Coq Proof Assistant / The Coq Development Team *) -(* <:expr< Genarg.VarArgType >> | Genarg.StringArgType -> <:expr< Genarg.StringArgType >> | Genarg.QuantHypArgType -> <:expr< Genarg.QuantHypArgType >> - | Genarg.OpenConstrArgType b -> <:expr< Genarg.OpenConstrArgType $mlexpr_of_bool b$ >> + | Genarg.OpenConstrArgType (b1,b2) -> <:expr< Genarg.OpenConstrArgType ($mlexpr_of_bool b1$, $mlexpr_of_bool b2$) >> | Genarg.ConstrWithBindingsArgType -> <:expr< Genarg.ConstrWithBindingsArgType >> | Genarg.BindingsArgType -> <:expr< Genarg.BindingsArgType >> | Genarg.RedExprArgType -> <:expr< Genarg.RedExprArgType >> diff --git a/parsing/q_util.ml4 b/parsing/q_util.ml4 index 7fe5a3c4..947e7e54 100644 --- a/parsing/q_util.ml4 +++ b/parsing/q_util.ml4 @@ -1,6 +1,6 @@ (************************************************************************) (* v * The Coq Proof Assistant / The Coq Development Team *) -(*