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

Problem with parameterize #69

Open
nagaflokhu opened this issue Jul 7, 2020 · 0 comments
Open

Problem with parameterize #69

nagaflokhu opened this issue Jul 7, 2020 · 0 comments

Comments

@nagaflokhu
Copy link

I wrote a #lang rash script and wanted for my display statements to go to stderr by default, so I changed

(module+ main
    (apply main (vector->list (current-command-line-arguments))))

to

(module+ main
  (parameterize ([current-output-port (current-error-port)])
    (apply main (vector->list (current-command-line-arguments)))))

which led to the following error:

  at: #%linea-default-line-macro
  in: (define-syntaxes (#%linea-default-line-macro) (make-rename-transformer (quote-syntax run-pipeline)))
  location...:
   /root/.racket/7.7/pkgs/rash/private/lang-funcs.rkt:182:6
  context...:
   do-raise-syntax-error
   add-binding!
   for-loop
   select-defined-syms-and-bind!
   finish
   [repeats 4 more times]
   pass-1-and-2-loop
   module-begin-k
   expand-module
   expand-submodule
   loop
   [repeats 15 more times]
   module-begin-k
   expand-module
   expand-capturing-lifts
   temp98_0
   ...

The same code without that one change runs fine.

You (@willghatch) mentioned on Riot that wrapping a let around parameterize gets around the issue, and the issue has something to do with splicing-syntax-parameterize.

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

1 participant