aboutsummaryrefslogtreecommitdiff
path: root/user-contrib/Ltac2/Fresh.v
blob: 548bf74a302f0a6691943b0daea3cb48e48bb556 (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
(************************************************************************)
(*         *   The Coq Proof Assistant / The Coq Development Team       *)
(*  v      *         Copyright INRIA, CNRS and contributors             *)
(* <O___,, * (see version control and CREDITS file for authors & dates) *)
(*   \VV/  **************************************************************)
(*    //   *    This file is distributed under the terms of the         *)
(*         *     GNU Lesser General Public License Version 2.1          *)
(*         *     (see LICENSE file for the text of the license)         *)
(************************************************************************)

Require Import Ltac2.Init.

Module Free.

Ltac2 Type t.
(** Type of sets of free variables *)

Ltac2 @ external union : t -> t -> t := "ltac2" "fresh_free_union".

Ltac2 @ external of_ids : ident list -> t := "ltac2" "fresh_free_of_ids".

Ltac2 @ external of_constr : constr -> t := "ltac2" "fresh_free_of_constr".

End Free.

Ltac2 @ external fresh : Free.t -> ident -> ident := "ltac2" "fresh_fresh".
(** Generate a fresh identifier with the given base name which is not a
    member of the provided set of free variables. *)