[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
bug#52749: G-expressions don't consistently preserve #nil
From: |
Maxime Devos |
Subject: |
bug#52749: G-expressions don't consistently preserve #nil |
Date: |
Mon, 03 Jan 2022 10:28:34 +0000 |
User-agent: |
Evolution 3.38.3-1 |
Philip McGrath schreef op ma 27-12-2021 om 13:38 [-0500]:
> I think the behavior of `gexp->approximate-sexp` is at least defensible,
> since its documentation (`info guix "gexp->approximate-sexp"`) warns
> that "some information can be lost".
But no information is lost in this case?
$ guix repl
> (use-modules (guix gexp))
> (gexp->approximate-sexp #~(a . #nil))
$1 = (a) ; sure, the #nil isn't printed ...
> (cdr $1)
$2 = () ; ... also not printed ...
> (values (eq? (cdr $1) #nil) (eq? (cdr $1) '()))
$3 = #t ; but it's still there!
$4 = #f
Greetings,
Maxime
signature.asc
Description: This is a digitally signed message part
- bug#52749: G-expressions don't consistently preserve #nil,
Maxime Devos <=