On Mon 11 May 2015 12:29, Nala Ginrut <nalagin...@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@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?



Reply via email to