[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[nongnu] elpa/geiser-racket c6b4c09 155/191: Racket: fix for evaluations
From: |
Philip Kaludercic |
Subject: |
[nongnu] elpa/geiser-racket c6b4c09 155/191: Racket: fix for evaluations inside typed/racket modules |
Date: |
Sun, 1 Aug 2021 18:32:19 -0400 (EDT) |
branch: elpa/geiser-racket
commit c6b4c09f2e7b5408f9787d50025464ccafc41e86
Author: Jose Antonio Ortega Ruiz <jao@gnu.org>
Commit: Jose Antonio Ortega Ruiz <jao@gnu.org>
Racket: fix for evaluations inside typed/racket modules
When evaluating (re)definitions in a typed module, it's necessary that
the form evaluated is wrapped with #%top-interaction, so that typed
racket's redefinition of that macro enters into play and the system
records the type information of the new value.
Many thanks to Sam Tobin-Hochstadt for the tip, and for his encouraging
words.
---
geiser/eval.rkt | 7 ++++---
geiser/user.rkt | 4 ++--
2 files changed, 6 insertions(+), 5 deletions(-)
diff --git a/geiser/eval.rkt b/geiser/eval.rkt
index 752a405..0a391e8 100644
--- a/geiser/eval.rkt
+++ b/geiser/eval.rkt
@@ -1,6 +1,6 @@
;;; eval.rkt -- evaluation
-;; Copyright (C) 2009, 2010, 2011, 2012, 2013 Jose Antonio Ortega Ruiz
+;; Copyright (C) 2009, 2010, 2011, 2012, 2013, 2014 Jose Antonio Ortega Ruiz
;; This program is free software; you can redistribute it and/or
;; modify it under the terms of the Modified BSD License. You should
@@ -52,10 +52,11 @@
(call-with-values thunk set-last-result)))))])
(append last-result `(,(cons 'output output)))))
-(define (eval-in form spec lang)
+(define (eval-in form spec lang . non-top)
(write (call-with-result
(lambda ()
- (eval form (module-spec->namespace spec lang)))))
+ (eval (if (null? non-top) (cons '#%top-interaction form) form)
+ (module-spec->namespace spec lang)))))
(newline))
(define (load-file file)
diff --git a/geiser/user.rkt b/geiser/user.rkt
index d8ac0b2..a35574b 100644
--- a/geiser/user.rkt
+++ b/geiser/user.rkt
@@ -1,6 +1,6 @@
;;; user.rkt -- global bindings visible to geiser users
-;; Copyright (C) 2010, 2011, 2012, 2013 Jose Antonio Ortega Ruiz
+;; Copyright (C) 2010, 2011, 2012, 2013, 2014 Jose Antonio Ortega Ruiz
;; This program is free software; you can redistribute it and/or
;; modify it under the terms of the Modified BSD License. You should
@@ -71,7 +71,7 @@
(let* ([proc (eval-here (read))]
[args (map eval-here (read))]
[ev (lambda () (apply proc args))])
- (eval-in `(,ev) mod lang))]
+ (eval-in `(,ev) mod lang #t))]
[else ((geiser:eval lang) form mod)])])
(datum->syntax #f (list 'quote res))))
- [nongnu] elpa/geiser-racket ed7347d 093/191: Racket: configurable image cache directory, (continued)
- [nongnu] elpa/geiser-racket ed7347d 093/191: Racket: configurable image cache directory, Philip Kaludercic, 2021/08/01
- [nongnu] elpa/geiser-racket 36d2d55 097/191: racket: reading into elisp-land the cache dir as needed, Philip Kaludercic, 2021/08/01
- [nongnu] elpa/geiser-racket 1f7a9e2 124/191: Racket: better help commands, Philip Kaludercic, 2021/08/01
- [nongnu] elpa/geiser-racket b23d52d 123/191: Racket: better help commands, Philip Kaludercic, 2021/08/01
- [nongnu] elpa/geiser-racket a5f8702 132/191: Racket: correct font lock for define/match, Philip Kaludercic, 2021/08/01
- [nongnu] elpa/geiser-racket 4e68ebc 140/191: racket: C-u C-c C-z on a submodule enters it, Philip Kaludercic, 2021/08/01
- [nongnu] elpa/geiser-racket 65447c4 138/191: racket: handling correctly submodules in load handler during , enter, Philip Kaludercic, 2021/08/01
- [nongnu] elpa/geiser-racket e1474f1 141/191: Nits, Philip Kaludercic, 2021/08/01
- [nongnu] elpa/geiser-racket eafee8d 142/191: racket: new , geiser-load command in REPL, Philip Kaludercic, 2021/08/01
- [nongnu] elpa/geiser-racket e311818 154/191: Racket: duplicate version check removed, Philip Kaludercic, 2021/08/01
- [nongnu] elpa/geiser-racket c6b4c09 155/191: Racket: fix for evaluations inside typed/racket modules,
Philip Kaludercic <=
- [nongnu] elpa/geiser-racket 7f89d8f 170/191: Use (car (process-lines ...)) instead of (shell-command ...), Philip Kaludercic, 2021/08/01
- [nongnu] elpa/geiser-racket a0532bc 169/191: Quoting binary on version checks (issue #117), Philip Kaludercic, 2021/08/01
- [nongnu] elpa/geiser-racket 5a7b12c 179/191: Fix typos, Philip Kaludercic, 2021/08/01
- [nongnu] elpa/geiser-racket 0cb58c8 183/191: racket server to access via geiser-connect, Philip Kaludercic, 2021/08/01
- [nongnu] elpa/geiser-racket 18cb3b3 185/191: README.md, Philip Kaludercic, 2021/08/01
- [nongnu] elpa/geiser-racket 1996cca 187/191: Ready for MELPA, Philip Kaludercic, 2021/08/01