From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp0 ([2001:41d0:2:4a6f::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms0.migadu.com with LMTPS id WKzLKv24xGHJOQAAgWs5BA (envelope-from ) for ; Thu, 23 Dec 2021 18:59:25 +0100 Received: from aspmx1.migadu.com ([2001:41d0:2:4a6f::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp0 with LMTPS id mI9wJv24xGHcAQAA1q6Kng (envelope-from ) for ; Thu, 23 Dec 2021 17:59:25 +0000 Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by aspmx1.migadu.com (Postfix) with ESMTPS id 76606E9B0 for ; Thu, 23 Dec 2021 18:59:25 +0100 (CET) Received: from localhost ([::1]:53840 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1n0SNA-0002H7-Lp for larch@yhetil.org; Thu, 23 Dec 2021 12:59:24 -0500 Received: from eggs.gnu.org ([209.51.188.92]:44318) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1n0SMo-0002FX-FW for bug-guix@gnu.org; Thu, 23 Dec 2021 12:59:03 -0500 Received: from debbugs.gnu.org ([209.51.188.43]:51552) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1n0SMo-0007Ak-6M for bug-guix@gnu.org; Thu, 23 Dec 2021 12:59:02 -0500 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1n0SMn-0008NL-Vd for bug-guix@gnu.org; Thu, 23 Dec 2021 12:59:02 -0500 X-Loop: help-debbugs@gnu.org Subject: bug#52749: G-expressions don't consistently preserve #nil Resent-From: Maxime Devos Original-Sender: "Debbugs-submit" Resent-CC: bug-guix@gnu.org Resent-Date: Thu, 23 Dec 2021 17:59:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 52749 X-GNU-PR-Package: guix X-GNU-PR-Keywords: To: Philip McGrath , 52749@debbugs.gnu.org Received: via spool by 52749-submit@debbugs.gnu.org id=B52749.164028232532170 (code B ref 52749); Thu, 23 Dec 2021 17:59:01 +0000 Received: (at 52749) by debbugs.gnu.org; 23 Dec 2021 17:58:45 +0000 Received: from localhost ([127.0.0.1]:34865 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1n0SMX-0008Mn-GE for submit@debbugs.gnu.org; Thu, 23 Dec 2021 12:58:45 -0500 Received: from andre.telenet-ops.be ([195.130.132.53]:60254) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1n0SMU-0008Me-U2 for 52749@debbugs.gnu.org; Thu, 23 Dec 2021 12:58:44 -0500 Received: from ptr-bvsjgyhxw7psv60dyze.18120a2.ip6.access.telenet.be ([IPv6:2a02:1811:8c09:9d00:3c5f:2eff:feb0:ba5a]) by andre.telenet-ops.be with bizsmtp id Ztyg2600Y4UW6Th01tygcF; Thu, 23 Dec 2021 18:58:41 +0100 Message-ID: <5624d97b0044f4f7e0dc761a590c857e40fc4ed9.camel@telenet.be> From: Maxime Devos Date: Thu, 23 Dec 2021 17:58:40 +0000 In-Reply-To: <23d2ac1d-737d-787c-5535-c816566461dd@philipmcgrath.com> References: <23d2ac1d-737d-787c-5535-c816566461dd@philipmcgrath.com> Content-Type: text/plain; charset="UTF-8" User-Agent: Evolution 3.38.3-1 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=telenet.be; s=r21; t=1640282321; bh=2afgQi2bdc9yrsSWNGVRtfThaEiilUAr155/dlqJLK0=; h=Subject:From:To:Date:In-Reply-To:References; b=E1xhq8rS2XRmjqq6QppS9KjIBcFpTt9KNu7599iTKQxZwbN6DP3RCIgyqTwjuQoiD bEL9KGACuA23VBwgfCT0deJwx7+aV+5jfpWAcPrtBAVtMIMN6bvtlH+ixVYPkrSo+C YJOFynFk6V8Sc0s98sBq6JES2Ke3t22IN3ILWz5KUjaRWejpONClkNkGW9K/RxC5QZ mzKN7Eft5m6F/tVBmHveldL8hlCpbKFovQjLR5IJJbKqUPGhyEAo53dhbqBQxCS2tB inBf7/TgrAWe91bcbGocbGsaYuOh+vxFcz0LLLqh+BFJ37MMMeum3E6TxFA8I9XHyw 78VFDfwdGUurQ== X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-BeenThere: bug-guix@gnu.org List-Id: Bug reports for GNU Guix List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-guix-bounces+larch=yhetil.org@gnu.org Sender: "bug-Guix" X-Migadu-Flow: FLOW_IN X-Migadu-Country: US ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=yhetil.org; s=key1; t=1640282365; h=from:from:sender:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:mime-version:mime-version: content-type:content-type: content-transfer-encoding:content-transfer-encoding:resent-cc: resent-from:resent-sender:resent-message-id:in-reply-to:in-reply-to: references:references:list-id:list-help:list-unsubscribe: list-subscribe:list-post:dkim-signature; bh=2afgQi2bdc9yrsSWNGVRtfThaEiilUAr155/dlqJLK0=; b=inLkhoVU1GSt/DGpGcdkI+Rb1QpH0ENcoexPOjzX+3EBy61b2zPZCXerqcL33YBvRl3pBE /yuGOVLHHCCAodA0Ux3bE1CvkEkjUg22yXRUZIm5ucncnlKrtaUJYQkZ734DbWt1xAa5M1 9JXAfgcbWZSqVO82uqAlLGLm3LQfWpZcMO3XAOaOB0HWGrDDuDhi/U5X8NnCxiyzUaFdBR QEW+FRnE6zzTtmpVcJ7m8/sd2gvD3dQvX3t+mXG6Pu8la7g7Z8G8Jtx/5HPtRJmYpOfGxM ZvpAwZPO7GUS2+XFg0fVlLqJ8Nl1TsePlHR0WhfEXUTI9qQERZBxDy1k0q3ROA== ARC-Seal: i=1; s=key1; d=yhetil.org; t=1640282365; a=rsa-sha256; cv=none; b=XOFmlQXZyiH3pPiq9tyofdeQXLdEbsVILk/QncMkgZOZa1QJ6VevCDgejMsSvOBeWH4Tqa KXpybJyquQ7SaeszalosmSH+20yY5frNeAH1hkVHaJhQcmy85/CPhITQnWRDBdqbVE6BMa 9OeEtBn0uBAUpmhmTd9lJY1sikmv9YDV20I+ScP84HaTV4J8y7XkQb1AZRUtDzgnDf5j4+ Qda31cO1bM5sYnD/F6evOS7WtzCPl97yvHFwRoPf0TIg51+gVTd7ThGBKc9SaDoG1CE5pA tOog0xS9H1FRdip2+XC9ZwL9pTBbDdnMMsWyHHumFcIxNuOkyT6ZKtq7JDyNWQ== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=fail ("headers rsa verify failed") header.d=telenet.be header.s=r21 header.b=E1xhq8rS; dmarc=fail reason="SPF not aligned (relaxed)" header.from=telenet.be (policy=none); spf=pass (aspmx1.migadu.com: domain of "bug-guix-bounces+larch=yhetil.org@gnu.org" designates 209.51.188.17 as permitted sender) smtp.mailfrom="bug-guix-bounces+larch=yhetil.org@gnu.org" X-Migadu-Spam-Score: -2.35 Authentication-Results: aspmx1.migadu.com; dkim=fail ("headers rsa verify failed") header.d=telenet.be header.s=r21 header.b=E1xhq8rS; dmarc=fail reason="SPF not aligned (relaxed)" header.from=telenet.be (policy=none); spf=pass (aspmx1.migadu.com: domain of "bug-guix-bounces+larch=yhetil.org@gnu.org" designates 209.51.188.17 as permitted sender) smtp.mailfrom="bug-guix-bounces+larch=yhetil.org@gnu.org" X-Migadu-Queue-Id: 76606E9B0 X-Spam-Score: -2.35 X-Migadu-Scanner: scn0.migadu.com X-TUID: TmG1QRkmMAzr Philip McGrath schreef op wo 22-12-2021 om 23:25 [-0500]: > G-expressions currently do not consistently preserve the distinction > between #nil and '(), which causes trouble for programs that rely on > that distinction. In particular, the issue affects programs that use > (guix build json), because that library uses #nil to represent the JSON > value `null', whereas it uses '() to represent an empty JSON array. > > The following program exposes the error: > [ > ;...] > > ; This one fails! > (check-equal? (gexp->json-string #~'(@ ("k" . #nil))) >                "{\"k\":null}" >                "gexp: null in object") A simpler test: Compare this: (cdr (gexp->approximate-sexp #~("stuff" . #nil))) ; output: #nil --- seems like everything is ok? with: (gexp->approximate-sexp #~("stuff" . #nil)) ; output: ("stuff") --- where did the #nil go? I think the idea is that, if you construct a list (a b c . #nil) in elisp, and pass it to Scheme, then Scheme should treat it as a Scheme list, so it should be printed as (a b c) when using Scheme's 'write' or 'display'. Greetings, Maxime.