[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
bug#20546: Syntax bug in master branch (till d99fedc5fd38c0)
From: |
Andy Wingo |
Subject: |
bug#20546: Syntax bug in master branch (till d99fedc5fd38c0) |
Date: |
Thu, 23 Jun 2016 22:27:11 +0200 |
User-agent: |
Gnus/5.13 (Gnus v5.13) Emacs/24.5 (gnu/linux) |
On Mon 11 May 2015 12:29, Nala Ginrut <address@hidden> 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:
address@hidden:~/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?
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- bug#20546: Syntax bug in master branch (till d99fedc5fd38c0),
Andy Wingo <=