Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

found a workaround by using an artificial set-bang

  • Loading branch information...
commit 6b8bcdaf767efe2294a7dd8d9a5580c5a64c20ff 1 parent 6323fce
Danny Yoo authored
Showing with 9 additions and 2 deletions.
  1. +9 −2 lang/js/js.rkt
View
11 lang/js/js.rkt
@@ -28,7 +28,8 @@
[impl
(map (compose resolve-implementation-path syntax-e)
(syntax->list #'(javascript-module-name ...)))]
- [(internal-name ...) (generate-temporaries #'(provided-name ...))])
+ [(internal-name ...) (generate-temporaries #'(provided-name ...))]
+ [(set-internal-name! ...) (generate-temporaries #'(provided-name ...))])
(syntax/loc stx
(begin
@@ -47,7 +48,13 @@
))
(require racket-module-name)
- (define internal-name provided-name) ...
+ (begin
+ (define internal-name provided-name)
+ ;; Discouraging constant folding via set! to address issue 74
+ ;; https://github.com/dyoo/whalesong/issues/74
+ (define (set-internal-name! x)
+ (set! internal-name x)))
+ ...
(provide (rename-out [internal-name provided-name] ...)))))]))
Please sign in to comment.
Something went wrong with that request. Please try again.