[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
07/08: bournish: Handle EOF in the reader.
From: |
Ludovic Courtès |
Subject: |
07/08: bournish: Handle EOF in the reader. |
Date: |
Mon, 6 Jun 2016 16:15:12 +0000 (UTC) |
civodul pushed a commit to branch master
in repository guix.
commit 8bebe00a76012a07e91930dcfd68058d4309ae99
Author: Ludovic Courtès <address@hidden>
Date: Mon Jun 6 18:06:58 2016 +0200
bournish: Handle EOF in the reader.
* guix/build/bournish.scm (read-bournish): Add case for EOF.
---
guix/build/bournish.scm | 6 ++++--
1 file changed, 4 insertions(+), 2 deletions(-)
diff --git a/guix/build/bournish.scm b/guix/build/bournish.scm
index 4022796..3bea1c8 100644
--- a/guix/build/bournish.scm
+++ b/guix/build/bournish.scm
@@ -134,8 +134,10 @@ commands such as 'ls' and 'cd'; it lacks globbing,
pipes---everything.\n"))
(define (read-bournish port env)
"Read a Bournish expression from PORT, and return the corresponding Scheme
code as an sexp."
- (match (string-tokenize (read-line port))
- ((command args ...)
+ (match (read-line port)
+ ((? eof-object? eof)
+ eof)
+ ((= string-tokenize (command args ...))
(match (assoc command %commands)
((command proc) ;built-in command
(apply proc (map expand-variable args)))
- branch master updated (6e8dee9 -> f82c585), Ludovic Courtès, 2016/06/06
- 06/08: gnu: Add ghc-wl-pprint., Ludovic Courtès, 2016/06/06
- 07/08: bournish: Handle EOF in the reader.,
Ludovic Courtès <=
- 02/08: gnu: Add ghc-aeson-pretty., Ludovic Courtès, 2016/06/06
- 05/08: gnu: Add ghc-union-find., Ludovic Courtès, 2016/06/06
- 04/08: gnu: Add ghc-indents., Ludovic Courtès, 2016/06/06
- 03/08: gnu: Add ghc-concatenative., Ludovic Courtès, 2016/06/06
- 01/08: file-systems: Remove unneeded import., Ludovic Courtès, 2016/06/06
- 08/08: bournish: Allow compilation of multiple expressions., Ludovic Courtès, 2016/06/06