me
/
guix
Archived
1
0
Fork 0

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.
master
Marius Bakke 2019-12-15 21:27:31 +01:00
parent fe3110ac58
commit ab7010af1f
No known key found for this signature in database
GPG Key ID: A2A06DF2A33A54FA
4 changed files with 9 additions and 3 deletions

View File

@ -98,7 +98,7 @@
(or (pred x) (or (pred x)
(one-of rest ...)))))) (one-of rest ...))))))
(one-of symbol? string? keyword? pair? null? array? (one-of symbol? string? keyword? pair? null? array?
number? boolean?))) number? boolean? char?)))
(match (primitive-fork) (match (primitive-fork)
(0 (0

View File

@ -1028,7 +1028,7 @@ and in the current monad setting (system type, etc.)"
(or (pred x) (or (pred x)
(one-of rest ...)))))) (one-of rest ...))))))
(one-of symbol? string? keyword? pair? null? array? (one-of symbol? string? keyword? pair? null? array?
number? boolean?))) number? boolean? char?)))
(define* (reference->sexp ref #:optional native?) (define* (reference->sexp ref #:optional native?)
(with-monad %store-monad (with-monad %store-monad

View File

@ -37,7 +37,7 @@
(or (pred x) (or (pred x)
(one-of rest ...)))))) (one-of rest ...))))))
(one-of symbol? string? keyword? pair? null? array? (one-of symbol? string? keyword? pair? null? array?
number? boolean?))) number? boolean? char?)))
(define (send-repl-response exp output) (define (send-repl-response exp output)
"Write the response corresponding to the evaluation of EXP to PORT, an "Write the response corresponding to the evaluation of EXP to PORT, an

View File

@ -886,6 +886,12 @@
(run-with-store %store (run-with-store %store
(lower-gexp #~(foo #$+))))) (lower-gexp #~(foo #$+)))))
(test-equal "lower-gexp, character literal"
'(#\+)
(lowered-gexp-sexp
(run-with-store %store
(lower-gexp #~(#\+)))))
(test-assertm "gexp->derivation #:references-graphs" (test-assertm "gexp->derivation #:references-graphs"
(mlet* %store-monad (mlet* %store-monad
((one (text-file "one" (random-text))) ((one (text-file "one" (random-text)))