| 1 | (** Represents freshly generated names at ppx expansion time. *) |
| 2 | |
| 3 | open! Base |
| 4 | open Ppxlib |
| 5 | |
| 6 | type t |
| 7 | |
| 8 | (** Creates a new fresh name using the given string as a prefix. *) |
| 9 | val create : string -> loc:location -> t |
| 10 | |
| 11 | (** [of_string_loc { loc; txt }] is equivalent to [create txt ~loc] *) |
| 12 | val of_string_loc : string loc -> t |
| 13 | |
| 14 | (** Extracts the freshly created name and its location. *) |
| 15 | val to_string_loc : t -> string loc |
| 16 | |
| 17 | (** Constructs an expression referring to the fresh name. *) |
| 18 | val expression : t -> expression |
| 19 | |
| 20 | (** Constructs a pattern binding the fresh name. *) |
| 21 | val pattern : t -> pattern |