aboutsummaryrefslogtreecommitdiffhomepage
path: root/toplevel/search.mli
blob: 56b6a1bdadabbed03a4f03bcd14f023f6a26493a (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
(************************************************************************)
(*  v      *   The Coq Proof Assistant  /  The Coq Development Team     *)
(* <O___,, *   INRIA - CNRS - LIX - LRI - PPS - Copyright 1999-2012     *)
(*   \VV/  **************************************************************)
(*    //   *      This file is distributed under the terms of the       *)
(*         *       GNU Lesser General Public License Version 2.1        *)
(************************************************************************)

open Pp
open Names
open Term
open Environ
open Pattern
open Globnames
open Nametab

(** {6 Search facilities. } *)

type glob_search_about_item =
  | GlobSearchSubPattern of constr_pattern
  | GlobSearchString of string

type filter_function = global_reference -> env -> constr -> bool
type display_function = global_reference -> env -> constr -> unit

val search_by_head : constr -> dir_path list * bool -> std_ppcmds
val search_rewrite : constr -> dir_path list * bool -> std_ppcmds
val search_pattern : constr -> dir_path list * bool -> std_ppcmds
val search_about  :
  (bool * glob_search_about_item) list -> dir_path list * bool -> std_ppcmds

val interface_search : (Interface.search_constraint * bool) list ->
  string Interface.coq_object list

(** The filtering function that is by standard search facilities.
   It can be passed as argument to the raw search functions. *)

val filter_by_module_from_list : dir_path list * bool -> filter_function

val filter_blacklist : filter_function

(** raw search functions can be used for various extensions. *)
val gen_filtered_search : filter_function -> display_function -> unit
val filtered_search : filter_function -> display_function -> global_reference -> unit
val raw_pattern_search : filter_function -> display_function -> constr_pattern -> unit
val raw_search_rewrite : filter_function -> display_function -> constr_pattern -> unit
val raw_search_about : filter_function -> display_function -> (bool * glob_search_about_item) list -> unit
val raw_search_by_head : filter_function -> display_function -> constr_pattern -> unit