[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
03/10: inferior: Add 'read-repl-response'.
From: |
guix-commits |
Subject: |
03/10: inferior: Add 'read-repl-response'. |
Date: |
Thu, 4 Jul 2019 12:05:19 -0400 (EDT) |
civodul pushed a commit to branch master
in repository guix.
commit d0ffa321dd4917ddb9777728ccf90bd147fe51fb
Author: Ludovic Courtès <address@hidden>
Date: Mon Jun 10 17:11:43 2019 +0200
inferior: Add 'read-repl-response'.
* guix/inferior.scm (read-repl-response): New procedure.
(read-inferior-response): Use it.
---
guix/inferior.scm | 9 +++++++--
1 file changed, 7 insertions(+), 2 deletions(-)
diff --git a/guix/inferior.scm b/guix/inferior.scm
index 63c9514..fee9775 100644
--- a/guix/inferior.scm
+++ b/guix/inferior.scm
@@ -59,6 +59,7 @@
inferior-eval
inferior-eval-with-store
inferior-object?
+ read-repl-response
inferior-packages
inferior-available-packages
@@ -183,7 +184,8 @@ equivalent. Return #f if the inferior could not be
launched."
(set-record-type-printer! <inferior-object> write-inferior-object)
-(define (read-inferior-response inferior)
+(define (read-repl-response port)
+ "Read a (guix repl) response from PORT and return it as a Scheme object."
(define sexp->object
(match-lambda
(('value value)
@@ -191,12 +193,15 @@ equivalent. Return #f if the inferior could not be
launched."
(('non-self-quoting address string)
(inferior-object address string))))
- (match (read (inferior-socket inferior))
+ (match (read port)
(('values objects ...)
(apply values (map sexp->object objects)))
(('exception key objects ...)
(apply throw key (map sexp->object objects)))))
+(define (read-inferior-response inferior)
+ (read-repl-response (inferior-socket inferior)))
+
(define (send-inferior-request exp inferior)
(write exp (inferior-socket inferior))
(newline (inferior-socket inferior)))
- branch master updated (fc3f149 -> e2332de), guix-commits, 2019/07/04
- 03/10: inferior: Add 'read-repl-response'.,
guix-commits <=
- 04/10: Add (guix remote)., guix-commits, 2019/07/04
- 08/10: gnu: Add python2-pyroute2., guix-commits, 2019/07/04
- 05/10: pack: 'docker' backend records the profile's search paths., guix-commits, 2019/07/04
- 09/10: gnu: Add python2-zeroconf., guix-commits, 2019/07/04
- 02/10: Add (guix repl)., guix-commits, 2019/07/04
- 07/10: gnu: Add python-notify2, python2-notify2., guix-commits, 2019/07/04
- 01/10: gexp: Add 'lower-gexp' and express 'gexp->derivation' in terms of it., guix-commits, 2019/07/04
- 06/10: pack: 'squashfs' backend records the profile's search paths., guix-commits, 2019/07/04
- 10/10: gnu: Add pulseaudio-dlna., guix-commits, 2019/07/04