guile-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Enhancement to the syntax system?


From: Marijn
Subject: Re: Enhancement to the syntax system?
Date: Wed, 04 Jul 2012 09:47:07 +0200
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:13.0) Gecko/20120618 Thunderbird/13.0

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Hi Stefan,

On 03-07-12 23:52, Stefan Israelsson Tampe wrote:
> You do not need gensyms if you try to mimic or implement my
> suggested #. . On the other hand when if you do this
> 
> (define (f stx) #`(let ((x 1)) #,stx))
> 
> and use this with
> 
> #`(let ((x 2)) #,(f #'x))
> 
> the resulting expanded code would produce 1 which is not what you
> want.

I tried it in Racket:


(define-for-syntax (f stx) #`(let ((x 1)) #,stx))

(define-syntax (m stx)
  (syntax-case stx ()
    ((_) #`(let ((x 2)) #,(f #'x))) ))

(m)


but I get error messages which I don't know what to do about. Do you
have running examples of code not producing the result you want?

Marijn
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v2.0.19 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/

iEYEARECAAYFAk/z9PsACgkQp/VmCx0OL2xMNACbBJKq9nZJKTzCJbdnq0iPgJoE
rSwAn2yJ1JTLMUn6v5ZR/PatxcGxgVrU
=HFFX
-----END PGP SIGNATURE-----



reply via email to

[Prev in Thread] Current Thread [Next in Thread]