From: Andy Wingo <wingo@igalia.com>
To: Hartmut Goebel <h.goebel@crazy-compilers.com>
Cc: guix-devel@gnu.org
Subject: Re: question regarding substitute* and #t
Date: Wed, 24 Jan 2018 16:27:06 +0100 [thread overview]
Message-ID: <87tvvb6zw5.fsf@igalia.com> (raw)
In-Reply-To: <72d8803f-0a3d-4d31-e8c8-a5e4be9f45e3@crazy-compilers.com> (Hartmut Goebel's message of "Wed, 24 Jan 2018 15:45:38 +0100")
On Wed 24 Jan 2018 15:45, Hartmut Goebel <h.goebel@crazy-compilers.com> writes:
> Am 24.01.2018 um 13:14 schrieb Andy Wingo:
>> On Wed 24 Jan 2018 13:06, Mark H Weaver <mhw@netris.org> writes:
>>
>>> + ;; Install to the right directory
>>> + (substitute* '("Makefile"
>>> + "Qsci/Makefile")
>>> + (("\\$\\(INSTALL_ROOT\\)/gnu/store/[^/]+")
>>> + (assoc-ref outputs "out")))
>>> + #t)))))
>> I guess once we switch over all instances of "system" and "system*" to
>> use invoke, does that mean we will also be able to remove these
>> vestigial "#t" returns?
> I wonder why substitute* not simply returns #t?!
There was a proposal to make it return #t! However then someone pointed
out that actually instead of making phases return boolean results, we
should instead signal problems via exceptions, and that drove the shift
from system / system* to invoke. In the future world where completion
means success, it doesn't matter what substitute* returns.
However! Because it doesn't matter, perhaps in the interest of
transition we should make substitute* return #t, so that once we switch
to the new exception-based error signalling, that we have less code to
clean up later.
Andy
next prev parent reply other threads:[~2018-01-24 15:27 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <20180124010802.18874.3012@vcs0.savannah.gnu.org>
[not found] ` <20180124010803.590AF2068F@vcs0.savannah.gnu.org>
2018-01-24 12:06 ` Simplifications enabled by switching to 'invoke' Mark H Weaver
2018-01-24 12:14 ` question regarding substitute* and #t (was: Simplifications enabled by switching to 'invoke') Andy Wingo
2018-01-24 13:28 ` question regarding substitute* and #t Mark H Weaver
2018-01-24 15:20 ` Andy Wingo
2018-01-24 21:09 ` Kei Kebreau
2018-01-25 5:31 ` Maxim Cournoyer
2018-01-25 7:51 ` Andy Wingo
2018-01-26 3:53 ` Maxim Cournoyer
2018-01-25 8:31 ` Arun Isaac
2018-01-25 20:02 ` Mark H Weaver
2018-01-24 14:45 ` Hartmut Goebel
2018-01-24 15:27 ` Andy Wingo [this message]
2018-01-24 22:10 ` Ricardo Wurmus
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=87tvvb6zw5.fsf@igalia.com \
--to=wingo@igalia.com \
--cc=guix-devel@gnu.org \
--cc=h.goebel@crazy-compilers.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).