Added format-unique-id to unstable/syntax.
This commit is contained in:
parent
7921074eef
commit
a46faaea40
|
@ -238,6 +238,17 @@ in the argument list are automatically converted to symbols.
|
|||
the second error but not of the first.)
|
||||
}
|
||||
|
||||
@margin-note{This binding was added by Vincent St-Amour.}
|
||||
@defproc[(format-unique-id [lctx (or/c syntax? #f)]
|
||||
[#:source src (or/c syntax? #f) #f]
|
||||
[#:props props (or/c syntax? #f) #f]
|
||||
[#:cert cert (or/c syntax? #f) #f]
|
||||
[fmt string?]
|
||||
[v (or/c string? symbol? identifier? keyword? char? number?)] ...)
|
||||
identifier?]{
|
||||
Like @racket[format-id], but returned identifiers are guaranteed to be unique.
|
||||
}
|
||||
|
||||
@defproc[(internal-definition-context-apply [intdef-ctx internal-definition-context?]
|
||||
[stx syntax?])
|
||||
syntax?]{
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
#lang racket/base
|
||||
;; owner: ryanc (and cce, where noted)
|
||||
;; owner: ryanc (and cce and stamourv, where noted)
|
||||
(require syntax/kerncase
|
||||
syntax/stx
|
||||
unstable/struct
|
||||
|
@ -49,6 +49,10 @@
|
|||
|
||||
syntax-list
|
||||
|
||||
;; by stamourv:
|
||||
|
||||
format-unique-id
|
||||
|
||||
)
|
||||
|
||||
;; Unwrapping syntax
|
||||
|
@ -383,3 +387,12 @@
|
|||
|
||||
(call-with-composable-continuation body trampoline-prompt-tag)
|
||||
(void))
|
||||
|
||||
(define (format-unique-id lctx
|
||||
#:source [src #f]
|
||||
#:props [props #f]
|
||||
#:cert [cert #f]
|
||||
fmt . args)
|
||||
((make-syntax-introducer) (apply format-id
|
||||
lctx #:source src #:props props #:cert cert
|
||||
fmt args)))
|
||||
|
|
Loading…
Reference in New Issue
Block a user