val add_var : t -> string -> unit
end
-(** Print all definitions in an environment. *)
-val print_env : out_channel -> env -> unit
-
(** %a formatters. *)
+val print_env : out_channel -> env -> unit
val string_pattern : unit -> pattern -> string
val string_expr : unit -> expr -> string
+val print_expr : out_channel -> expr -> unit
) patterns in
match patterns with
- | [_, name, goal, args] ->
- run_goal env loc name args goal
-
| [] ->
(* There's no matching goal, but we don't need one if
* the tactic doesn't need to be rebuilt.
Ast.string_loc loc Ast.string_expr t
)
- | _ ->
- (* If there are multiple matching goals, then assuming the goals
- * are different we must pick the one which was defined last in
- * the file. However we don't do that right now. XXX
+ | goals ->
+ (* One or more goals match. We run them all (although if
+ * one of them succeeds in rebuilding, it will cut short the rest).
*)
- assert false (* TODO! *)
+ List.iter (
+ fun (_, name, goal, args) ->
+ run_goal env loc name args goal
+ ) goals
(* Test if pattern matches *tactic(cargs). If it does
* then we return Some args where args is the arguments that must