> On Apr 3, 2018, at 4:37 AM, Ryan Culpepper 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
>
> On Apr 3, 2018, at 2:31 PM, Kevin Forchione wrote:
>
> Hi Guys,
> Does anyone have an analogous example for let-syntax to something as simple
> as this?
>
> (let ([a 3]) a)
>
> Something like….
>
> (let-syntax ([a 3]) ….)
>
> At which point I’m stumped as
On Tue, Apr 3, 2018 at 3:02 PM, Shu-Hung You
wrote:
> Hi Keven,
>
> Here's an example:
>
> #lang racket
> (let-syntax ([a (lambda (stx)
>(printf "expansion time: stx = ~a\n" stx)
>#'3) ])
> a)
>
>
Hi Keven,
Here's an example:
#lang racket
(let-syntax ([a (lambda (stx)
(printf "expansion time: stx = ~a\n" stx)
#'3) ])
a)
However, I would suggest to start at least from syntax objects and
macro transformers in the guide and use
Hi Guys,
Does anyone have an analogous example for let-syntax to something as simple as
this?
(let ([a 3]) a)
Something like….
(let-syntax ([a 3]) ….)
At which point I’m stumped as to what expression in the body would return 3.
There are no examples in the Reference.
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.
Ryan
On 4/3/18 8:33 AM,
One way the student languages from HtDP are different from most Racket DSLs
and langs is that, in the service of regularity and nice error messages,
they take away many convenient and powerful features of the full Racket
language. There is not really an "escape hatch" into full Racket, other
than
Consider the difference in results below. How would I persuade `syntax-parse`
to match literal identifiers in the `free-identifier=?` sense that
`syntax-case` does? (and thereby allow unbound identifiers to be compared also)
IIUC, `#:literals` is too strict, as it insists that every listed
8 matches
Mail list logo