diff options
author | ppedrot <ppedrot@85f007b7-540e-0410-9357-904b9bb8a0f7> | 2013-02-10 17:40:19 +0000 |
---|---|---|
committer | ppedrot <ppedrot@85f007b7-540e-0410-9357-904b9bb8a0f7> | 2013-02-10 17:40:19 +0000 |
commit | 846879625d0f51457fc9fb51d7e936548de16dcf (patch) | |
tree | 66cc5bab3acf7f8f7fe80b6cab7c205a7c8ce181 /parsing | |
parent | ce0176d8c25aa353c06b1f8f56ead63f28fb6efc (diff) |
Useless use of hooks in VernacDefinition. In addition, this was
polluting the AST first-order structure.
git-svn-id: svn+ssh://scm.gforge.inria.fr/svn/coq/trunk@16196 85f007b7-540e-0410-9357-904b9bb8a0f7
Diffstat (limited to 'parsing')
-rw-r--r-- | parsing/g_vernac.ml4 | 22 |
1 files changed, 10 insertions, 12 deletions
diff --git a/parsing/g_vernac.ml4 b/parsing/g_vernac.ml4 index fb5524945..47d1796ce 100644 --- a/parsing/g_vernac.ml4 +++ b/parsing/g_vernac.ml4 @@ -68,7 +68,6 @@ let default_command_entry = Gram.Entry.of_parser "command_entry" (fun strm -> Gram.parse_tokens_after_filter (get_command_entry ()) strm) -let no_hook _ _ = () GEXTEND Gram GLOBAL: vernac gallina_ext tactic_mode noedit_mode subprf subgoal_command; vernac: FIRST @@ -154,14 +153,14 @@ GEXTEND Gram l = LIST0 [ "with"; id = identref; bl = binders; ":"; c = lconstr -> (Some id,(bl,c,None)) ] -> - VernacStartTheoremProof (thm,(Some id,(bl,c,None))::l, false, no_hook) + VernacStartTheoremProof (thm,(Some id,(bl,c,None))::l, false) | stre = assumption_token; nl = inline; bl = assum_list -> VernacAssumption (stre, nl, bl) | stre = assumptions_token; nl = inline; bl = assum_list -> test_plurial_form bl; VernacAssumption (stre, nl, bl) - | (f,d) = def_token; id = identref; b = def_body -> - VernacDefinition (d, id, b, f) + | d = def_token; id = identref; b = def_body -> + VernacDefinition (d, id, b) (* Gallina inductive declarations *) | f = finite_token; indl = LIST1 inductive_definition SEP "with" -> @@ -197,13 +196,13 @@ GEXTEND Gram ; def_token: [ [ "Definition" -> - no_hook, (Global, Definition) + (Global, Definition) | IDENT "Let" -> - no_hook, (Local, Definition) + (Local, Definition) | IDENT "Example" -> - no_hook, (Global, Example) + (Global, Example) | IDENT "SubClass" -> - Class.add_subclass_hook, (use_locality_exp (), SubClass) ] ] + (use_locality_exp (), SubClass) ] ] ; assumption_token: [ [ "Hypothesis" -> (Local, Logical) @@ -534,16 +533,15 @@ GEXTEND Gram d = def_body -> let s = coerce_reference_to_id qid in VernacDefinition - ((Global,CanonicalStructure),(Loc.ghost,s),d, - (fun _ -> Recordops.declare_canonical_structure)) + ((Global,CanonicalStructure),(Loc.ghost,s),d) (* Coercions *) | IDENT "Coercion"; qid = global; d = def_body -> let s = coerce_reference_to_id qid in - VernacDefinition ((use_locality_exp (),Coercion),(Loc.ghost,s),d,Class.add_coercion_hook) + VernacDefinition ((use_locality_exp (),Coercion),(Loc.ghost,s),d) | IDENT "Coercion"; IDENT "Local"; qid = global; d = def_body -> let s = coerce_reference_to_id qid in - VernacDefinition ((enforce_locality_exp true,Coercion),(Loc.ghost,s),d,Class.add_coercion_hook) + VernacDefinition ((enforce_locality_exp true,Coercion),(Loc.ghost,s),d) | IDENT "Identity"; IDENT "Coercion"; IDENT "Local"; f = identref; ":"; s = class_rawexpr; ">->"; t = class_rawexpr -> VernacIdentityCoercion (enforce_locality_exp true, f, s, t) |