You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
What version of Racket are you using?
e.g., 8.11.1 [cs]
What program did you run?
Please include a short example that triggers the bug
Running at the top-level with racket/splicing enabled: (splicing-parameterize () 1)
What should have happened?
Should gave back 1, as ordinary parameterize does. Instead it gives void.
Please include any other relevant details
splicing-parameterize creates a top-level variable to hold the parameterization which it then deallocates with set! as it's last expression. It's this set! that is causing the void.
The text was updated successfully, but these errors were encountered:
This appears to be a somewhat intended behavior, because splicing-parameterize is “splicing” like begin, unless it’s in an expression context (try wrapping it in #%expression!). It’s the same as if you evaluate (begin 1 (void)) in the REPL: in reality, two forms will be spliced into the module body, but the REPL will print nothing. I’m not sure there’s an apparent “fix”.
Edit: One thing that’s really problematic, I think, is that the expansion makes it that the last definition form is no longer the last form, which changes the semantics.
Edit 2: Upon a further reflection, the above point doesn’t matter, because it only applies to top-level/module contexts.
What version of Racket are you using?
e.g., 8.11.1 [cs]
What program did you run?
Please include a short example that triggers the bug
Running at the top-level with
racket/splicing
enabled:(splicing-parameterize () 1)
What should have happened?
Should gave back
1
, as ordinaryparameterize
does. Instead it givesvoid
.Please include any other relevant details
splicing-parameterize
creates a top-level variable to hold the parameterization which it then deallocates withset!
as it's last expression. It's thisset!
that is causing thevoid
.The text was updated successfully, but these errors were encountered: