aboutsummaryrefslogtreecommitdiffhomepage
path: root/proofs/proof_bullet.mli
blob: 09fcabf50a5a392a099b09c8f9d764a0d28480f2 (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
49
50
51
(************************************************************************)
(*  v      *   The Coq Proof Assistant  /  The Coq Development Team     *)
(* <O___,, *   INRIA - CNRS - LIX - LRI - PPS - Copyright 1999-2017     *)
(*   \VV/  **************************************************************)
(*    //   *      This file is distributed under the terms of the       *)
(*         *       GNU Lesser General Public License Version 2.1        *)
(************************************************************************)

(**********************************************************)
(*                                                        *)
(*                                 Bullets                *)
(*                                                        *)
(**********************************************************)

type t = Vernacexpr.bullet

(** A [behavior] is the data of a put function which
    is called when a bullet prefixes a tactic, a suggest function
    suggesting the right bullet to use on a given proof, together
    with a name to identify the behavior. *)
type behavior = {
  name : string;
  put : Proof.t -> t -> Proof.t;
  suggest: Proof.t -> Pp.t
}

(** A registered behavior can then be accessed in Coq
    through the command [Set Bullet Behavior "name"].

    Two modes are registered originally:
    * "Strict Subproofs":
      - If this bullet follows another one of its kind, defocuses then focuses
        (which fails if the focused subproof is not complete).
      - If it is the first bullet of its kind, then focuses a new subproof.
    * "None": bullets don't do anything *)
val register_behavior : behavior -> unit

(** Handles focusing/defocusing with bullets:
     *)
val put : Proof.t -> t -> Proof.t
val suggest : Proof.t -> Pp.t

(**********************************************************)
(*                                                        *)
(*                     Default goal selector              *)
(*                                                        *)
(**********************************************************)

val pr_goal_selector : Vernacexpr.goal_selector -> Pp.t
val get_default_goal_selector : unit -> Vernacexpr.goal_selector