GNU bug report logs -
#20546
Syntax bug in master branch (till d99fedc5fd38c0)
Previous Next
Full log
View this message in rfc822 format
On Mon 11 May 2015 12:29, Nala Ginrut <nalaginrut <at> gmail.com> writes:
> I'm using master branch (till d99fedc5fd38c0), and I found this code
> can't run in 2.1, but works in 2.0:
>
> (define-syntax define-art
> (lambda (x)
> (syntax-case x ()
> ((_ name) (identifier? #'name)
> #`(begin
> (define name 2)
> (define #,(datum->syntax #'name
> (symbol-append 'define- (syntax->datum #'name)))
> 33))))))
>
> Of course, the meaning of this code is trivial.
Works for me:
wingo <at> clucks:~/src/guile$ meta/guile
GNU Guile 2.1.3.17-b8f5c-dirty
Copyright (C) 1995-2016 Free Software Foundation, Inc.
Guile comes with ABSOLUTELY NO WARRANTY; for details type `,show w'.
This program is free software, and you are welcome to redistribute it
under certain conditions; type `,show c' for details.
Enter `,help' for help.
scheme@(guile-user)> (define-syntax define-art
... (lambda (x)
... (syntax-case x ()
... ((_ name) (identifier? #'name)
... #`(begin
... (define name 2)
... (define #,(datum->syntax #'name
... (symbol-append 'define- (syntax->datum #'name)))
... 33))))
... )
... )
scheme@(guile-user)> (define-art foo)
scheme@(guile-user)> foo
$1 = 2
scheme@(guile-user)> define-foo
$2 = 33
Must be some bug that was fixed in the meantime?
This bug report was last modified 8 years and 294 days ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.