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

Invalid identifier access when using user made SRFI and running with --program #3

Open
Retropikzel opened this issue Jan 2, 2025 · 1 comment

Comments

@Retropikzel
Copy link

main.scm:

(import (scheme base)
        (scheme write)
        (srfi 8))


(receive (a b) (values 1 2)
         (begin
           (display a)
           (newline)
           (display b)
           (newline)))

srfi/8.sld:

(define-library
  (srfi 8)
  (import (scheme base))
  (export receive)
  (include "8.scm"))

srfi/8.scm:

(define-syntax receive
  (syntax-rules ()
    ((receive formals expression body ...)
     (call-with-values (lambda () expression)
                       (lambda formals body ...)))))

Works with:
skint -I ./ main.scm

But gives error with:
skint -I ./ --program main.scm

The error is:
Error: transformer: invalid identifier access (srfi 8) (srfi 8) ref

It seems to also work with --script. Is this the default behaviour? Should it not work with --program?

@dermagen
Copy link
Contributor

dermagen commented Jan 4, 2025

Hmm. Will look at it tomorrow, thanks.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants