> On Apr 3, 2018, at 4:37 AM, Ryan Culpepper <ry...@ccs.neu.edu> wrote:
> 
> Here's one way:
> 
>  (~and z:id
>       (~fail #:unless (free-identifier=? #'z #'zeta)
>              "expected the identifier `zeta`"))
> 
> Another way is to make a syntax class (either specifically for `zeta` or 
> parameterized by the identifier) that does the same check.



What about just using `~literal`? It seems to be more lenient than `#:literals` 
(because it accepts unbound identifiers) but also relies on the 
`free-identifier=?` predicate. [1] 


[1] 
https://docs.racket-lang.org/syntax/stxparse-patterns.html?q=~literal#%28form._%28%28lib._syntax%2Fparse..rkt%29._~7eliteral%29%29
 
<https://docs.racket-lang.org/syntax/stxparse-patterns.html?q=~literal#(form._((lib._syntax/parse..rkt)._~7eliteral))>


-- 
You received this message because you are subscribed to the Google Groups 
"Racket Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to racket-users+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to