summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--NEWS5
-rw-r--r--module/ice-9/boot-9.scm1
-rw-r--r--module/system/repl/coop-server.scm14
3 files changed, 14 insertions, 6 deletions
diff --git a/NEWS b/NEWS
index 651d0d76a..4915b94f5 100644
--- a/NEWS
+++ b/NEWS
@@ -10,6 +10,11 @@ Changes in 2.1.4 (changes since the 2.1.3 alpha release):
* Bug fixes
** Don't replace + with space when splitting and decoding URI paths
+** Fix bug importing specific bindings with #:select
+
+It used to be that if #:select didn't find a binding in the public
+interface of a module, it would actually grovel in the module's
+unexported private bindings. This was not intended and is now fixed.
[TODO: Fold into generic 2.2 release notes.]
diff --git a/module/ice-9/boot-9.scm b/module/ice-9/boot-9.scm
index 6eae844fe..00899812e 100644
--- a/module/ice-9/boot-9.scm
+++ b/module/ice-9/boot-9.scm
@@ -2798,7 +2798,6 @@ written into the port is returned."
(orig (if direct? bspec (car bspec)))
(seen (if direct? bspec (cdr bspec)))
(var (or (module-local-variable public-i orig)
- (module-local-variable module orig)
(error
;; fixme: format manually for now
(simple-format
diff --git a/module/system/repl/coop-server.scm b/module/system/repl/coop-server.scm
index c19dda191..f3f5116a9 100644
--- a/module/system/repl/coop-server.scm
+++ b/module/system/repl/coop-server.scm
@@ -25,14 +25,18 @@
#:use-module (ice-9 threads)
#:use-module (ice-9 q)
#:use-module (srfi srfi-9)
- #:use-module ((system repl repl)
- #:select (start-repl* prompting-meta-read))
- #:use-module ((system repl server)
- #:select (run-server* make-tcp-server-socket
- add-open-socket! close-socket!))
+ #:use-module ((system repl server) #:select (make-tcp-server-socket))
#:export (spawn-coop-repl-server
poll-coop-repl-server))
+;; Hack to import private bindings from (system repl repl).
+(define-syntax-rule (import-private module sym ...)
+ (begin
+ (define sym (@@ module sym))
+ ...))
+(import-private (system repl repl) start-repl* prompting-meta-read)
+(import-private (system repl server) run-server* add-open-socket! close-socket!)
+
(define-record-type <coop-repl-server>
(%make-coop-repl-server mutex queue)
coop-repl-server?