diff options
| author | Pierre-Marie Pédrot | 2016-05-11 15:33:47 +0200 |
|---|---|---|
| committer | Pierre-Marie Pédrot | 2016-05-11 19:09:19 +0200 |
| commit | 16d0e6f7cfc453944874cc1665a0eb4db8ded354 (patch) | |
| tree | 56ba9db96c8eed38d1605bfce5d389d9c45c057a /ltac | |
| parent | 85753a0bdb6183604a78232c4c32fd15f7a21a2a (diff) | |
Making the grammar command extend API purely functional.
Instead of leaving the responsibility of extending the grammar to the caller,
we ask for a list of extensions in the return value of the function.
Diffstat (limited to 'ltac')
| -rw-r--r-- | ltac/tacentries.ml | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/ltac/tacentries.ml b/ltac/tacentries.ml index 714bfa8417..5720a6f378 100644 --- a/ltac/tacentries.ml +++ b/ltac/tacentries.ml @@ -184,8 +184,8 @@ let add_tactic_entry (kn, ml, tg) state = in let prods = List.map map tg.tacgram_prods in let rules = make_rule mkact prods in - grammar_extend entry None (pos, [(None, None, List.rev [rules])]); - (1, state) + let r = ExtendRule (entry, None, (pos, [(None, None, [rules])])) in + ([r], state) let tactic_grammar = create_grammar_command "TacticGrammar" add_tactic_entry |
