Re: [Chicken-users] Re: matchable egg ticket #487

2011-01-28 Thread Alan Post
On Sat, Jan 29, 2011 at 10:52:15AM +0900, Alex Shinn wrote:
> On Fri, Jan 28, 2011 at 12:15 AM, Alan Post  
> wrote:
> > I'm only going to get more demanding out of what I'd like match to
> > do, I would like the latest version.
> 
> I've updated matchable from the latest upstream,
> which includes the fix.
> 

Thank you Alex.  I've updated my copy of the matchable egg, removed
the workaround I was using to avoid triggering the bug, and after
that change my regression tests all pass.

-Alan
-- 
.i ko djuno fi le do sevzi

___
Chicken-users mailing list
Chicken-users@nongnu.org
http://lists.nongnu.org/mailman/listinfo/chicken-users


Re: [Chicken-users] Re: matchable egg ticket #487

2011-01-28 Thread Alex Shinn
On Fri, Jan 28, 2011 at 12:15 AM, Alan Post  wrote:
> I'm only going to get more demanding out of what I'd like match to
> do, I would like the latest version.

I've updated matchable from the latest upstream,
which includes the fix.

-- 
Alex

___
Chicken-users mailing list
Chicken-users@nongnu.org
http://lists.nongnu.org/mailman/listinfo/chicken-users


Re: [Chicken-users] Re: matchable egg ticket #487

2011-01-27 Thread Alan Post
I'm only going to get more demanding out of what I'd like match to
do, I would like the latest version.

-Alan

On Thu, Jan 27, 2011 at 10:17:19PM +0900, Alex Shinn wrote:
> Fixed upstream, including http://synthcode.com/scheme/match-cond-expand.scm,
> which is basically suitable for Chicken modulo the module syntax.
> 
> Do we want the latest version for Chicken (with tree patterns and ..1),
> or should I just patch this one bug?
> 
> -- 
> Alex
> 
> 
> On Tue, Jan 25, 2011 at 8:32 AM, Alan Post  
> wrote:
> > On Tue, Jan 25, 2011 at 07:51:12AM +0900, Alex Shinn wrote:
> >> On Sun, Jan 23, 2011 at 3:01 PM, Alan Post  
> >> wrote:
> >> >
> >> > I've just come across a bug in the matchable egg which I've
> >> > documented in ticket #487:
> >> >
> >> >  http://bugs.call-cc.org/ticket/487
> >> >
> >> > A call is made to |length| even when the input isn't a list if a
> >> > production contains |...|.
> >>
> >> Thanks, those tail-patterns are a relatively recent extension
> >> and this is indeed a bug.  I'll fix it ASAP.
> >>
> >
> > I tried using |...| as something of a last resort trying to match a
> > tail pattern, thinking "I wonder if the ... in the documentation is
> > literal, rather than elision.  I couldn't figure out any other way
> > to match a tail pattern.  Given that they are new, I see now I may
> > have used something that wasn't documented, which clears up a
> > confusion of mine.
> >
> > I wrote such a lengthy test case just to prove to myself that ...
> > was working like I expected it to.
> >
> > These tail-pattern matches are a time-saver for me.  In one
> > particular case I have a complex set of boolean variables that I use
> > to generate code, and I use match later on in the routine in order
> > to determine what happened, rather than reusing the boolean
> > variables to see if I made a modification.
> >
> > Basically, I have:
> >
> >  if A do x, y
> >  if B do y, z
> >  if C do x, z
> >
> > and I mant to make sure I do x, y, or z only once, even if there are
> > multiple variables set that require it.
> >
> > Thank you Alex!
> >
> > -Alan
> > --
> > .i ko djuno fi le do sevzi
> >
> 
> ___
> Chicken-users mailing list
> Chicken-users@nongnu.org
> http://lists.nongnu.org/mailman/listinfo/chicken-users

-- 
.i ko djuno fi le do sevzi

___
Chicken-users mailing list
Chicken-users@nongnu.org
http://lists.nongnu.org/mailman/listinfo/chicken-users


Re: [Chicken-users] Re: matchable egg ticket #487

2011-01-27 Thread Alex Shinn
Fixed upstream, including http://synthcode.com/scheme/match-cond-expand.scm,
which is basically suitable for Chicken modulo the module syntax.

Do we want the latest version for Chicken (with tree patterns and ..1),
or should I just patch this one bug?

-- 
Alex


On Tue, Jan 25, 2011 at 8:32 AM, Alan Post  wrote:
> On Tue, Jan 25, 2011 at 07:51:12AM +0900, Alex Shinn wrote:
>> On Sun, Jan 23, 2011 at 3:01 PM, Alan Post  
>> wrote:
>> >
>> > I've just come across a bug in the matchable egg which I've
>> > documented in ticket #487:
>> >
>> >  http://bugs.call-cc.org/ticket/487
>> >
>> > A call is made to |length| even when the input isn't a list if a
>> > production contains |...|.
>>
>> Thanks, those tail-patterns are a relatively recent extension
>> and this is indeed a bug.  I'll fix it ASAP.
>>
>
> I tried using |...| as something of a last resort trying to match a
> tail pattern, thinking "I wonder if the ... in the documentation is
> literal, rather than elision.  I couldn't figure out any other way
> to match a tail pattern.  Given that they are new, I see now I may
> have used something that wasn't documented, which clears up a
> confusion of mine.
>
> I wrote such a lengthy test case just to prove to myself that ...
> was working like I expected it to.
>
> These tail-pattern matches are a time-saver for me.  In one
> particular case I have a complex set of boolean variables that I use
> to generate code, and I use match later on in the routine in order
> to determine what happened, rather than reusing the boolean
> variables to see if I made a modification.
>
> Basically, I have:
>
>  if A do x, y
>  if B do y, z
>  if C do x, z
>
> and I mant to make sure I do x, y, or z only once, even if there are
> multiple variables set that require it.
>
> Thank you Alex!
>
> -Alan
> --
> .i ko djuno fi le do sevzi
>

___
Chicken-users mailing list
Chicken-users@nongnu.org
http://lists.nongnu.org/mailman/listinfo/chicken-users


Re: [Chicken-users] Re: matchable egg ticket #487

2011-01-24 Thread Alan Post
On Tue, Jan 25, 2011 at 07:51:12AM +0900, Alex Shinn wrote:
> On Sun, Jan 23, 2011 at 3:01 PM, Alan Post  
> wrote:
> >
> > I've just come across a bug in the matchable egg which I've
> > documented in ticket #487:
> >
> >  http://bugs.call-cc.org/ticket/487
> >
> > A call is made to |length| even when the input isn't a list if a
> > production contains |...|.
> 
> Thanks, those tail-patterns are a relatively recent extension
> and this is indeed a bug.  I'll fix it ASAP.
> 

I tried using |...| as something of a last resort trying to match a
tail pattern, thinking "I wonder if the ... in the documentation is
literal, rather than elision.  I couldn't figure out any other way
to match a tail pattern.  Given that they are new, I see now I may
have used something that wasn't documented, which clears up a
confusion of mine.

I wrote such a lengthy test case just to prove to myself that ...
was working like I expected it to.

These tail-pattern matches are a time-saver for me.  In one
particular case I have a complex set of boolean variables that I use
to generate code, and I use match later on in the routine in order
to determine what happened, rather than reusing the boolean
variables to see if I made a modification.

Basically, I have:

 if A do x, y
 if B do y, z
 if C do x, z

and I mant to make sure I do x, y, or z only once, even if there are
multiple variables set that require it.

Thank you Alex!

-Alan
-- 
.i ko djuno fi le do sevzi

___
Chicken-users mailing list
Chicken-users@nongnu.org
http://lists.nongnu.org/mailman/listinfo/chicken-users


[Chicken-users] Re: matchable egg ticket #487

2011-01-24 Thread Alex Shinn
On Sun, Jan 23, 2011 at 3:01 PM, Alan Post  wrote:
>
> I've just come across a bug in the matchable egg which I've
> documented in ticket #487:
>
>  http://bugs.call-cc.org/ticket/487
>
> A call is made to |length| even when the input isn't a list if a
> production contains |...|.

Thanks, those tail-patterns are a relatively recent extension
and this is indeed a bug.  I'll fix it ASAP.

-- 
Alex

___
Chicken-users mailing list
Chicken-users@nongnu.org
http://lists.nongnu.org/mailman/listinfo/chicken-users