summaryrefslogtreecommitdiff
path: root/scheme/racket/geiser/eval.rkt
diff options
context:
space:
mode:
Diffstat (limited to 'scheme/racket/geiser/eval.rkt')
-rw-r--r--scheme/racket/geiser/eval.rkt22
1 files changed, 10 insertions, 12 deletions
diff --git a/scheme/racket/geiser/eval.rkt b/scheme/racket/geiser/eval.rkt
index 4e7f3db..78db857 100644
--- a/scheme/racket/geiser/eval.rkt
+++ b/scheme/racket/geiser/eval.rkt
@@ -17,15 +17,13 @@
compile-file
macroexpand
make-repl-reader)
+
(require geiser/enter geiser/modules geiser/autodoc)
(require errortrace/errortrace-lib)
(define last-result (void))
-(define namespace->module-name
- (compose module-path-name->name namespace->module-path-name))
-
(define last-namespace (make-parameter (current-namespace)))
(define (exn-key e)
@@ -55,10 +53,11 @@
(append last-result `((output . ,output)))))
(define (eval-in form spec lang)
- (call-with-result
- (lambda ()
- (update-signature-cache spec form)
- (eval form (module-spec->namespace spec lang)))))
+ (write (call-with-result
+ (lambda ()
+ (update-signature-cache spec form)
+ (eval form (module-spec->namespace spec lang)))))
+ (newline))
(define compile-in eval-in)
@@ -74,10 +73,9 @@
(lambda ()
(pretty-print (syntax->datum ((if all expand expand-once) form)))))))
-(define (make-repl-reader builtin-reader)
- (lambda (ns)
- (last-namespace ns)
- (printf "racket@~a" (namespace->module-name ns))
- (builtin-reader)))
+(define (make-repl-reader reader)
+ (lambda ()
+ (last-namespace (current-namespace))
+ (reader)))
;;; eval.rkt ends here