Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

define-values doesn't work with dot #290

Closed
Tracked by #43
jcubic opened this issue Jan 24, 2024 · 2 comments
Closed
Tracked by #43

define-values doesn't work with dot #290

jcubic opened this issue Jan 24, 2024 · 2 comments
Labels
bug Something isn't working conformance
Milestone

Comments

@jcubic
Copy link
Collaborator

jcubic commented Jan 24, 2024

This works:

(call-with-values
  (lambda () (values 1 2))
  (lambda (x . rest)
     (display x)
     (newline)
     (display rest)
     (newline)))

But this does not:

(define-values (a . b)
  (values 1 2))
(cons a b)
@jcubic jcubic added bug Something isn't working conformance labels Jan 24, 2024
@jcubic
Copy link
Collaborator Author

jcubic commented Jan 24, 2024

The scheme code for define-values is taken from R7RS and works correctly in different implementations. So the problem my be in syntax-rules.

@jcubic
Copy link
Collaborator Author

jcubic commented Jan 24, 2024

This is issue with macros. This doesn't match. bar ... should match nothing.

(define-syntax foo
  (syntax-rules ()
    ((_ (foo bar ... . baz))
     '(foo baz))))

(print (foo (a . b)))

jcubic added a commit that referenced this issue Jan 24, 2024
jcubic added a commit that referenced this issue Jan 24, 2024
@jcubic jcubic closed this as completed Jan 24, 2024
@jcubic jcubic added this to the 1.0 milestone Jan 26, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working conformance
Projects
None yet
Development

No branches or pull requests

1 participant