paines / ypsilon

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

Suspected lexical context bug #128

Open GoogleCodeExporter opened 9 years ago

GoogleCodeExporter commented 9 years ago
In revision 87 (and still present in the newest revision) of the SRFIs
collection [1] I manage, in the file srfi/%3a43/vectors.sls, I used
let-syntax in a way so that the original vector-lib.scm reference
implementation file does not have to be modified at all (which helps
maintenance when diff'ing).  This exposed a bug in Ypsilon, which I suspect
involves lexical context issues possibly related to bugs #106 and #107.  I
tried to narrow down the bug, but could not.  See below for the original
bug exposed by srfi/%3a43/vectors.sls.

[1] https://code.launchpad.net/~scheme-libraries-team/scheme-libraries/srfi

$ ypsilon --r6rs srfi/tests/vectors.sps 

error in define: attempt to modify immutable binding
  >  (define make-vector make-vector)
  ..."/home/d/zone/scheme/srfi/%3a43/vectors.sls"

expanding:
  >  (syntax ((AV (quote make-vector)) x ...))
  ..."/home/d/zone/scheme/srfi/%3a43/vectors.sls"
  *  ...
  *  (define-syntax receive
       (syntax-rules ()
         ((receive ?formals ?producer ?body1 ?body2 ...)
          (call-with-values
            (lambda () ?producer)
            (lambda ?formals ?body1 ?body2 ...)))))
  ..."/home/d/zone/scheme/srfi/%3a43/vectors.sls" line 71
  *  (include/resolve ("srfi" "%3a43") "vector-lib.scm")
  ..."/home/d/zone/scheme/srfi/%3a43/vectors.sls" line 71
  *  (SRFI-23-error->R6RS
       "(library (srfi :43 vectors))"
       (include/resolve ("srfi" "%3a43") "vector-lib.scm"))
  ..."/home/d/zone/scheme/srfi/%3a43/vectors.sls" line 70
  *  (with-syntax ((|.L0| (rename (syntax name)))) (syntax (define |.L0| . r)))
  ..."/home/d/zone/scheme/srfi/%3a43/vectors.sls" line 62
  *  (quasisyntax (define (unsyntax (rename (syntax name))) . r))
  ..."/home/d/zone/scheme/srfi/%3a43/vectors.sls" line 62

$ 

Original issue reported on code.google.com by derick.e...@gmail.com on 15 Sep 2009 at 9:23

GoogleCodeExporter commented 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