larcenists / larceny

Larceny Scheme implementation
Other
202 stars 32 forks source link

define-values raises an error with unbound variable set-cdr! #738

Closed ktakashi closed 8 years ago

ktakashi commented 9 years ago

(Might be related to #680) The following expression raises an error (executed on the REPL of larceny -r7rs):

(define-values (a b c) (values 1 2 3))

Syntax violation: invalid reference
No binding available for set-cdr! in library (larceny r7rs macros)
Form: set-cdr!

Trace:
  (set-cdr! a (cddr a))
  (lambda (v) (set-cdr! a (cddr a)) v)
  ((lambda (v) (set-cdr! a (cddr a)) v) (cadr a))
  (let ((v (cadr a))) (set-cdr! a (cddr a)) v)

Error: unhandled condition:
Compound condition has these components:
#<record &who>
    who : "invalid reference"
#<record &message>
    message : "No binding available for set-cdr! in library (larceny r7rs macros)"
#<record &syntax>
    form : set-cdr!
    subform : #f

Entering debugger; type "?" for help.

Using the following version.

$ larceny -version
Larceny v0.98 "General Ripper" (Mar  7 2015 01:06:26, precise:Linux:unified)
WillClinger commented 8 years ago

Fixed by changeset 789d45b8aa58e6181e891d5df75f152b9dfa262c