[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
05/06: gexp: Allow character literals in GEXP->SEXP.
From: |
guix-commits |
Subject: |
05/06: gexp: Allow character literals in GEXP->SEXP. |
Date: |
Wed, 18 Dec 2019 16:37:22 -0500 (EST) |
mbakke pushed a commit to branch master
in repository guix.
commit ab7010af1f1077c056529769a53a380147c3933f
Author: Marius Bakke <address@hidden>
Date: Sun Dec 15 21:27:31 2019 +0100
gexp: Allow character literals in GEXP->SEXP.
Fixes <https://bugs.gnu.org/38628>.
* tests/gexp.scm ("lower-gexp, character literal"): New test.
* guix/gexp.scm (gexp->sexp)[self-quoting?]: Add CHAR? to the tested types.
* guix/repl.scm (self-quoting?): Likewise.
* gnu/tests.scm (marionette-shepherd-service)[self-quoting?]: Likewise.
---
gnu/tests.scm | 2 +-
guix/gexp.scm | 2 +-
guix/repl.scm | 2 +-
tests/gexp.scm | 6 ++++++
4 files changed, 9 insertions(+), 3 deletions(-)
diff --git a/gnu/tests.scm b/gnu/tests.scm
index 27cb39c..cc72e56 100644
--- a/gnu/tests.scm
+++ b/gnu/tests.scm
@@ -98,7 +98,7 @@
(or (pred x)
(one-of rest ...))))))
(one-of symbol? string? keyword? pair? null? array?
- number? boolean?)))
+ number? boolean? char?)))
(match (primitive-fork)
(0
diff --git a/guix/gexp.scm b/guix/gexp.scm
index a96592a..411f084 100644
--- a/guix/gexp.scm
+++ b/guix/gexp.scm
@@ -1028,7 +1028,7 @@ and in the current monad setting (system type, etc.)"
(or (pred x)
(one-of rest ...))))))
(one-of symbol? string? keyword? pair? null? array?
- number? boolean?)))
+ number? boolean? char?)))
(define* (reference->sexp ref #:optional native?)
(with-monad %store-monad
diff --git a/guix/repl.scm b/guix/repl.scm
index 1ead18c..0f75f9c 100644
--- a/guix/repl.scm
+++ b/guix/repl.scm
@@ -37,7 +37,7 @@
(or (pred x)
(one-of rest ...))))))
(one-of symbol? string? keyword? pair? null? array?
- number? boolean?)))
+ number? boolean? char?)))
(define (send-repl-response exp output)
"Write the response corresponding to the evaluation of EXP to PORT, an
diff --git a/tests/gexp.scm b/tests/gexp.scm
index 84c1642..8b1596f 100644
--- a/tests/gexp.scm
+++ b/tests/gexp.scm
@@ -886,6 +886,12 @@
(run-with-store %store
(lower-gexp #~(foo #$+)))))
+(test-equal "lower-gexp, character literal"
+ '(#\+)
+ (lowered-gexp-sexp
+ (run-with-store %store
+ (lower-gexp #~(#\+)))))
+
(test-assertm "gexp->derivation #:references-graphs"
(mlet* %store-monad
((one (text-file "one" (random-text)))
- branch master updated (7ebf4c4 -> 9077cf6), guix-commits, 2019/12/18
- 01/06: gnu: Remove uses of deprecated Qemu network configuration., guix-commits, 2019/12/18
- 02/06: gnu: darktable: Fix build failure., guix-commits, 2019/12/18
- 04/06: gnu: darktable: Update to 2.6.3., guix-commits, 2019/12/18
- 03/06: gnu: darktable: Remove redundant inputs., guix-commits, 2019/12/18
- 06/06: gnu: libdbi-drivers: Adapt to multiple-output MariaDB., guix-commits, 2019/12/18
- 05/06: gexp: Allow character literals in GEXP->SEXP.,
guix-commits <=