SapphireDensetsu / ypsilon

Automatically exported from code.google.com/p/ypsilon
Other
0 stars 0 forks source link

define-record-type fields' procedures' identifiers lose their lexical context #90

Closed GoogleCodeExporter closed 8 years ago

GoogleCodeExporter commented 8 years ago
Even though `foo' is macro-introduced (which means the exception for the
last expression below is correct), the other identifiers are not, and so
they should retain their original lexical context, which means the
exceptions for the `foo-x' and `foo-x-set!' expressions below are incorrect
because those identifiers should be bound.

Ypsilon 0.9.6-trunk/r416 Copyright (c) 2009 Y.Fujita, LittleWing Company
Limited.
> (define-syntax def-foo
    (syntax-rules ()
      ((_ make pred (field accessor setter) ...)
       (define-record-type (foo make pred)
         (fields (mutable field accessor setter) ...)))))

> (def-foo make-foo foo? (x foo-x foo-x-set!))

> foo-x

error: unbound variable foo-x
> foo-x-set!

error: unbound variable foo-x-set!
> make-foo

#<closure 0xb5693510>
> foo?

#<closure 0xb5693530>
> foo

error: unbound variable foo
> 

Original issue reported on code.google.com by derick.e...@gmail.com on 6 Apr 2009 at 2:21

GoogleCodeExporter commented 8 years ago
Thank you for your bug report!
-- fujita

Original comment by y.fujita...@gmail.com on 6 Apr 2009 at 10:51

GoogleCodeExporter commented 8 years ago
I have fixed the bug and trunk directory is updated to revision 418.
Please try. Thank you!
--fujita

Original comment by y.fujita...@gmail.com on 7 Apr 2009 at 1:26

GoogleCodeExporter commented 8 years ago
It's fixed.

Original comment by derick.e...@gmail.com on 7 Apr 2009 at 4:06