summaryrefslogtreecommitdiff
path: root/guix/read-print.scm
diff options
context:
space:
mode:
Diffstat (limited to 'guix/read-print.scm')
-rw-r--r--guix/read-print.scm8
1 files changed, 5 insertions, 3 deletions
diff --git a/guix/read-print.scm b/guix/read-print.scm
index d834105dce..83b9a61b35 100644
--- a/guix/read-print.scm
+++ b/guix/read-print.scm
@@ -179,9 +179,11 @@ BLANK-LINE? is true, assume PORT is at the beginning of a new line."
(match lst
(() result)
(((? dot?) . rest)
- (let ((dotted (reverse rest)))
- (set-cdr! (last-pair dotted) (car result))
- dotted))
+ (if (pair? rest)
+ (let ((dotted (reverse rest)))
+ (set-cdr! (last-pair dotted) (car result))
+ dotted)
+ (car result)))
((x . rest) (loop (cons x result) rest)))))
(let loop ((blank-line? blank-line?)