[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Chicken-hackers] [PATCH] Fix #1274

From: Peter Bex
Subject: [Chicken-hackers] [PATCH] Fix #1274
Date: Sun, 3 Apr 2016 18:15:51 +0200
User-agent: Mutt/1.5.23 (2014-03-12)

Hi all,

Attached is a patch to fix issue #1274.  The problem in this bug was that
multi-value variables ("mvars" in ##sys#canonicalize-body) and their
value-producing expressions ("mvals") were collected separately from
single-value variables ("vars") and their expressions ("vals").

I had hoped to be able to simplify the code by joining the collection
but this didn't really work out due to the fact that they really need
to be kept separate, because a single-value variable can receive more
than one value (which is called "implicit multival" in the
documentation), whereas a multi-value definition which happens to
define only one variable needs to accept _exactly_ the one value,
no more and no less.

This patch changes the code to collect everything in "vars" and
"vals", where single-value variables are treated identically to
one-variable multival-definitions.  To avoid the aforementioned
problem, we collect a third list of booleans (which also uses
the "mvars" name), where #t means the originating definition
was a multi-variable one and #f means it was a "regular" single
valued "implicit multival" definition.

There were two small merge conflicts due to the renames of
defjam-error and expand-curried-define, so I'm also attaching
a chicken-5 version of the patch.  For the rest it is identical.


Attachment: 0001-Fix-1274-by-grouping-mvars-and-vars-together.chicken-5.patch
Description: Text Data

Attachment: 0001-Fix-1274-by-grouping-mvars-and-vars-together.master.patch
Description: Text Data

Attachment: signature.asc
Description: Digital signature

reply via email to

[Prev in Thread] Current Thread [Next in Thread]