[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Chicken-hackers] [PATCH] Fix bad call in chicken-install error situ
From: |
Mario Domenech Goulart |
Subject: |
Re: [Chicken-hackers] [PATCH] Fix bad call in chicken-install error situation |
Date: |
Thu, 19 Jul 2012 20:13:10 -0400 |
User-agent: |
Gnus/5.13 (Gnus v5.13) Emacs/23.1.91 (gnu/linux) |
Hi,
On Wed, 18 Jul 2012 21:46:38 +0200 (CEST) Felix <address@hidden> wrote:
> From: Peter Bex <address@hidden>
> Subject: Re: [Chicken-hackers] [PATCH] Fix bad call in chicken-install error
> situation
> Date: Tue, 17 Jul 2012 21:21:55 +0200
>
>> On Mon, Jul 16, 2012 at 02:44:58PM -0400, Mario Domenech Goulart wrote:
>>> Shouldn't `with-default-sources' give something like
>>>
>>> (lambda ()
>>> (with-output-to-port (current-error-port)
>>> (lambda ()
>>> (print "Could not determine a source of extensions. "
>>> "Please, specify a location and a transport for a
>>> source.")))
>>> (exit 1))
>>>
>>> as the third argument to proc? Or maybe it could simply abort instead
>>> of calling proc.
>>
>> I don't know. This code is confusing. Maybe Felix can chime in.
>
> Indeed, it is truly horrible. AFAIK "trans" will never be #f, so "next"
> should not be called in "list-available-extensions". Mario's suggestion
> looks correct to me.
Attached is patch. It takes the least intrusive path: it fixes the
number of arguments to `proc' by passing a thunk that will be called as
`next' (it allows for procedures that receive it as argument doing
whatever they want before actually calling `next'). That thunk just
makes the process exit.
Best wishes.
Mario
--
http://parenteses.org/mario
0001-chicken-install-abort-when-transport-and-location-ca.patch
Description: Text Data