@@ -20,6 +20,7 @@ let (ptmReturn,
2020
2121 ptmLemma,
2222 ptmDefinitionRed,
23+ ptmRewriteRule,
2324 ptmAxiomRed,
2425 ptmMkDefinition,
2526 ptmMkInductive,
@@ -64,6 +65,7 @@ let (ptmReturn,
6465
6566 r_template_monad_prop_p " tmLemma" ,
6667 r_template_monad_prop_p " tmDefinitionRed_" ,
68+ r_template_monad_prop_p " tmRewriteRule_" ,
6769 r_template_monad_prop_p " tmAxiomRed" ,
6870 r_template_monad_prop_p " tmMkDefinition" ,
6971 r_template_monad_prop_p " tmMkInductive" ,
@@ -174,6 +176,7 @@ type template_monad =
174176
175177 (* creating definitions *)
176178 | TmDefinition of Constr. t * Constr. t * Constr. t * Constr. t * Constr. t
179+ | TmRewriteRule of Constr. t * Constr. t
177180 | TmDefinitionTerm of Constr. t * Constr. t * Constr. t * Constr. t
178181 | TmLemma of Constr. t * Constr. t
179182 | TmLemmaTerm of Constr. t * Constr. t
@@ -283,6 +286,11 @@ let next_action env evd (pgm : constr) : template_monad * _ =
283286 | opaque ::name ::s ::typ ::body ::[] ->
284287 (TmDefinition (opaque, name, s, typ, body), universes)
285288 | _ -> monad_failure " tmDefinitionRed" 4
289+ else if eq_gr ptmRewriteRule then
290+ match args with
291+ | name ::rules ::[] ->
292+ (TmRewriteRule (name, rules), universes)
293+ | _ -> monad_failure " tmRewriteRule" 2
286294 else if eq_gr ttmDefinition then
287295 match args with
288296 | opaque ::name ::typ ::body ::[] ->
0 commit comments