What failure do you see? When I run the program, it seems to compile
and run ok.

At Thu, 27 Jul 2017 15:41:28 -0400, Jay McCarthy wrote:
> I don't understand why the last macro invocation here fails, given
> that m4 shows you can store hasheqs and m5 shows you can store
> identifiers and m1 shows you can store foos.
> 
> #lang racket/base
> (require (for-syntax racket/base))
> (begin-for-syntax
>   (struct foo (x y) #:prefab))
> 
> (define-syntax e1 (foo #'e1 2))
> 
> (define-syntax (m1 stx)
>   (syntax-case stx ()
>     [(_ x)
>      (quasisyntax (define-syntax x #,(foo #'x 2)))]))
> 
> (define-syntax e7 (make-hasheq))
> 
> (define-syntax (m4 stx)
>   (syntax-case stx ()
>     [(_ x)
>      (let ([ht (make-hasheq)])
>        (quasisyntax (define-syntax x #,ht)))]))
> (m4 e8)
> 
> (define-syntax (m5 stx)
>   (syntax-case stx ()
>     [(_ x)
>      (quasisyntax (define-syntax x #,(foo #'x #'x)))]))
> (m5 e9)
> 
> (define-syntax (m6 stx)
>   (syntax-case stx ()
>     [(_ x)
>      (let ([ht (make-hasheq)])
>        (hash-set! ht 'y #'x)
>        (quasisyntax (define-syntax x #,(foo #'x ht))))]))
> (m6 e10)
> 
> -- 
> -=[     Jay McCarthy               http://jeapostrophe.github.io    ]=-
> -=[ Associate Professor        PLT @ CS @ UMass Lowell     ]=-
> -=[ Moses 1:33: And worlds without number have I created; ]=-
> 
> -- 
> You received this message because you are subscribed to the Google Groups 
> "Racket Developers" group.
> To unsubscribe from this group and stop receiving emails from it, send an 
> email to [email protected].
> To post to this group, send email to [email protected].
> To view this discussion on the web visit 
> https://groups.google.com/d/msgid/racket-dev/CAJYbDa%3D2arSqhvknnG1JGPg7aXDALUQ
> DvUEV%3DJSBTMR6CD8psA%40mail.gmail.com.
> For more options, visit https://groups.google.com/d/optout.

-- 
You received this message because you are subscribed to the Google Groups 
"Racket Developers" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/racket-dev/20170727195934.40B80650079%40mail-svr1.cs.utah.edu.
For more options, visit https://groups.google.com/d/optout.

Reply via email to