let pp_reduction_kind = function
| `Reduce -> "reduce"
- | `Simpl -> "simpl"
+ | `Simpl -> "simplify"
| `Whd -> "whd"
let rec pp_tactic = function
(match idents with [] -> "" | idents -> " " ^ pp_idents idents)
| Left -> "left"
| LetIn (term, ident) -> sprintf "let %s in %s" (pp_term term) ident
- | Reduce (_, _, _) -> assert false (* TODO *)
+ | Reduce (kind, None)
+ | Reduce (kind, Some ([], `Goal)) -> pp_reduction_kind kind
+ | Reduce (kind, Some ([], `Everywhere)) ->
+ sprintf "%s in hyp" (pp_reduction_kind kind)
+ | Reduce (kind, Some (terms, `Goal)) ->
+ sprintf "%s %s" (pp_reduction_kind kind)
+ (String.concat ", " (List.map pp_term terms))
+ | Reduce (kind, Some (terms, `Everywhere)) ->
+ sprintf "%s in hyp %s" (pp_reduction_kind kind)
+ (String.concat ", " (List.map pp_term terms))
| Reflexivity -> "reflexivity"
| Replace (t1, t2) -> sprintf "replace %s with %s" (pp_term t1) (pp_term t2)
| Replace_pattern (_, _) -> assert false (* TODO *)