* true means inductive, false coinductive *)
type 'term inductive_type = string * bool * 'term * (string * 'term) list
+type search_kind = [ `Locate | `Hint | `Match | `Elim ]
+
type 'term command =
| Abort
| Baseuri of string option (** get/set base uri *)
| Check of 'term
+ | Search_pat of search_kind * string (* searches with string pattern *)
+ | Search_term of search_kind * 'term (* searches with term pattern *)
| Proof
| Qed of string option
(** name.
| `Remark -> "Remark"
| `Theorem -> "Theorem"
+let pp_search_kind = function
+ | `Locate -> "locate"
+ | `Hint -> "hint"
+ | `Match -> "match"
+ | `Elim -> "elim"
+
let pp_command = function
| Abort -> "Abort"
| Baseuri (Some uri) -> sprintf "Baseuri \"%s\"" uri
| Quit -> "Quit"
| Redo None -> "Redo"
| Redo (Some n) -> sprintf "Redo %d" n
+ | Search_pat (kind, pat) ->
+ sprintf "search %s \"%s\"" (pp_search_kind kind) pat
+ | Search_term (kind, term) ->
+ sprintf "search %s %s" (pp_search_kind kind) (pp_term term)
| Inductive (params, types) ->
let pp_params = function
| [] -> ""