From 540293601e7dcac9eb193d529d7b2413765f3c72 Mon Sep 17 00:00:00 2001 From: Jose Antonio Ortega Ruiz Date: Sun, 1 Jul 2012 02:18:55 +0200 Subject: 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. --- scheme/racket/geiser/enter.rkt | 16 +++++++++------- 1 file 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) -- cgit v1.2.3