summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJose Antonio Ortega Ruiz <jao@gnu.org>2012-07-01 02:18:55 +0200
committerJose Antonio Ortega Ruiz <jao@gnu.org>2012-07-01 02:18:55 +0200
commit540293601e7dcac9eb193d529d7b2413765f3c72 (patch)
tree28f08b8392a7a9d3c2b48809902c23771390f692
parent1312f42a54252fa4378d7dfbd68591f9e6275c1a (diff)
downloadgeiser-chez-540293601e7dcac9eb193d529d7b2413765f3c72.tar.gz
geiser-chez-540293601e7dcac9eb193d529d7b2413765f3c72.tar.bz2
Racket: fix for module compilation for recent rackets
This one probably requires Racket 5.3, and incorporates some parameterization to the module compilation and evaluation code in Geiser's version of enter.rkt. I'm mostly mirroring what the latter does, and i'm probably not completely understanding all corner cases, so the two users of Geiser should keep an eye open for possible breakage introduced by this patch.
-rw-r--r--scheme/racket/geiser/enter.rkt16
1 files changed, 9 insertions, 7 deletions
diff --git a/scheme/racket/geiser/enter.rkt b/scheme/racket/geiser/enter.rkt
index cb33a55..e996527 100644
--- a/scheme/racket/geiser/enter.rkt
+++ b/scheme/racket/geiser/enter.rkt
@@ -85,12 +85,13 @@
(current-continuation-marks))))
(if name
;; Module load:
- (let ([code (get-module-code path "compiled" compile
- (lambda (ext loader?)
- (load-extension ext)
- #f)
- #:notify (lambda (chosen)
- (notify re? chosen)))]
+ (let ([code (get-module-code
+ path "compiled"
+ (lambda (e)
+ (parameterize ([compile-enforce-module-constants #f])
+ (compile e)))
+ (lambda (ext loader?) (load-extension ext) #f)
+ #:notify (lambda (chosen) (notify re? chosen)))]
[path (normal-case-path
(simplify-path
(path->complete-path path
@@ -107,7 +108,8 @@
null))])
(add-paths! m (resolve-paths path)))
;; Evaluate the module:
- (eval code))
+ (parameterize ([current-module-declare-source path])
+ (eval code)))
;; Not a module:
(begin
(notify re? path)