unofficial mirror of bug-guix@gnu.org 
 help / color / mirror / code / Atom feed
From: "Ludovic Courtès" <ludo@gnu.org>
To: Marius Bakke <mbakke@fastmail.com>
Cc: 38628-done@debbugs.gnu.org
Subject: bug#38628: [PATCH] gexp: Allow character literals in GEXP->SEXP.
Date: Thu, 19 Dec 2019 12:11:44 +0100	[thread overview]
Message-ID: <87pngktvrj.fsf@gnu.org> (raw)
In-Reply-To: <877e2tcmqq.fsf@devup.no> (Marius Bakke's message of "Wed, 18 Dec 2019 23:06:21 +0100")

Hi Marius,

Marius Bakke <mbakke@fastmail.com> skribis:

> Marius Bakke <mbakke@fastmail.com> writes:
>
>> Ludovic Courtès <ludo@gnu.org> writes:
>>
>>> Also it would be nice to add a tiny test close to the one that
>>> 24ab804ce11fe12ff49cd144a3d9c4bfcf55b41c added.
>>
>> Good idea.  I came up with this:
>>
>> diff --git a/tests/gexp.scm b/tests/gexp.scm
>> index 84c16422c2..8b1596f66d 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)))
>>
>> WDYT?
>
> I ended up pushing this in ab7010af1f1077c056529769a53a380147c3933f,
> even though I suspect there is an easier test that could reveal this
> problem without involving the store, somewhere.  Improvements welcome.

We could have called ‘gexp->sexp’ directly, but we’d still need the
store anyway, so IMO that’s good!

Thanks,
Ludo’.

      reply	other threads:[~2019-12-19 11:12 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-12-15 20:27 bug#38628: Character literals unsupported in source 'snippets' Marius Bakke
2019-12-15 20:35 ` bug#38628: [PATCH] gexp: Allow character literals in GEXP->SEXP Marius Bakke
2019-12-16 21:51   ` Ludovic Courtès
2019-12-16 21:53     ` Ludovic Courtès
2019-12-18 18:59       ` Marius Bakke
2019-12-18 22:06         ` Marius Bakke
2019-12-19 11:11           ` Ludovic Courtès [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://guix.gnu.org/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=87pngktvrj.fsf@gnu.org \
    --to=ludo@gnu.org \
    --cc=38628-done@debbugs.gnu.org \
    --cc=mbakke@fastmail.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/guix.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).