Open GoogleCodeExporter opened 9 years ago
Interestingly, Mosh also has issues with the SRFI collection (see
<http://code.google.com/p/mosh-scheme/issues/detail?id=134>), but does
/not/ expose the hygiene issues indicated by Bug 106 and Bug 107.
Original comment by rott...@gmail.com
on 11 Apr 2010 at 12:48
Today the SRFI collection mentioned in this issue is maintained here: https://github.com/arcfide/chez-srfi/. The bug in Ypsilon is still a problem and affects SRFI-43 and SRFI-78 from chez-srfi.
The syntax-violation comes from here: https://github.com/fujita-y/ypsilon/blob/master/heap/boot/macro/library.scm#L469
But if I comment out that code then there is a new error: error in library: attempt to export unbound identifier my:vector-fill!
.
My guess is that let-syntax
is doing something wrong. It should be permissible to redefine define
inside let-syntax
and in chez-srfi/%3a43/vectors.sls
there is a definition of my:vector-fill!
happening inside a let-syntax
.
The syntax-violation on library.scm:469 should not be getting triggered because that check is done for define
and this is inside let-syntax
. And conversely it seems that perhaps the definition of my:vector-fill!
is not getting flattened into the library top level? I'm just guessing, I'm not familiar with how your expander is implemented.
It would be nice to get this fixed so that chez-srfi will be working with Ypsilon.
I suspect datum->syntax has some issue and continue investigating, since simple redefinition of top-level identifier, and splicing definitions into top-level seems working. Thank you!
$ ypsilon -6
ypsilon-2.0.8 (r6rs)
> (library (foo)
(export)
(import (rnrs))
(let-syntax
((define
(lambda (stx)
(syntax-case stx ()
((_ arg )
#'(display arg))))))
(define "foo text")))
foo text
> (library (bar)
(export hoge1 hoge2)
(import (rnrs))
(let-syntax ()
(define hoge1 "hoge1 text")
(define hoge2 "hoge2 text")))
> (import (bar))
> hoge1
"hoge1 text"
>
Original issue reported on code.google.com by
derick.e...@gmail.com
on 15 Sep 2009 at 9:23