[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Chicken-hackers] [PATCH 0/5] List scrutiny special cases
From: |
Peter Bex |
Subject: |
Re: [Chicken-hackers] [PATCH 0/5] List scrutiny special cases |
Date: |
Sun, 19 Oct 2014 14:34:11 +0200 |
User-agent: |
Mutt/1.4.2.3i |
On Tue, Sep 09, 2014 at 02:57:17AM -0700, Evan Hanson wrote:
> Hi hackers,
>
> Here are some list-related scrutiny improvements. I started with pair
> walking for the scrutinizer's special cases to fix #759 (patch #2),
> which made adding special cases for drop & tail easy (#3). The other
> special cases (#4, #5) are basically just improving result type accuracy
> for make-list, make-vector and reverse, where possible.
>
> The list-copy types.db fix (#1) speaks for itself, I think. Let me know
> if anything looks off.
Hi, Evan!
Sorry it took so long for me to get around to this set of patches.
This is some great work! I've pushed these patches, but I had to make
one small modification: the special case for split-at was incorrect.
I'm not sure how to indicate returning multiple values inside the
scrutinizer, but simply wrapping them in a list doesn't seem to work.
With your patch as-is, the following program errors out with a message
that the inlined function doesn't return multiple values:
(use srfi-1)
(print (+ (receive (a b) (split-at (list 1 2 'a 4) 2) a) 2))
I've simply taken out the split-at special case, so we at least get
these patches in. I've applied them all to chicken-5 *and* master.
Of course, if srfi-1 is ever taken out of core, we'd have to revert some
of these patches. But chances are that we'll use something similar to
these procedures in core, which can then perhaps be special-cased in the
same way.
Cheers,
Peter
--
http://www.more-magic.net
- Re: [Chicken-hackers] [PATCH 0/5] List scrutiny special cases,
Peter Bex <=