[Top][All Lists]

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

Re: [Chicken-users] matchable egg: error while reporting error?

From: Peter Bex
Subject: Re: [Chicken-users] matchable egg: error while reporting error?
Date: Mon, 3 Jun 2019 08:01:18 +0200
User-agent: NeoMutt/20170113 (1.7.2)

On Mon, Jun 03, 2019 at 06:21:56AM +0200, Marco Maggi wrote:
> Ciao,
>   with CHICKEN  5.0.0 this  form using  MATCH from  "matchable" (updated
> right now):
> (match '(#:a #:b c d)
>   (((? keyword? k*) ... (? symbol? s*) ...)
>    (pretty-print k*)
>    (pretty-print s*))
>   (_
>    (pretty-print 'no)))
> fails with:
> Error: during expansion of (match-syntax-error283 ...) - no rule matches 
> form: (match-syntax-error "multiple ellipsis patterns not allowed at same 
> level")
> which looks like an error while reporting an error.

Hi Marco,

It's complaining about your pattern, which is ambiguous.  Well,
you could say it's not strictly ambiguous, but the pattern matcher
doesn't know that.

It expands to a syntax-rules pattern, which cannot contain multiple
ellipsis at the same level.  The reason?

How should 
(syntax-rules ()
  ((foo bar "haha" more ... "haha" even-more ...)
   (list even-more ...)))
(blah 1 "haha" 2 3 4 "haha" 5 6 7 "haha" 8 9 10 "haha")?

It could return either (5 6 7 "haha" 8 9 10 "haha"),
(8 9 10 "haha") or ().

Normally one would solve this by saying it could be greedy or
non-greedy (like in regexes), but the spec doesn't specify, so
strictly speaking this is an error.  That's what gets reported.

>   By  the way:  should this  be reported  directly on  the bugs  server,
> without previous confirmation by someone else?   Of is it fine to report
> it here first?   And do I really  need to privately contact  a person to
> get an account on the bugs server?

If you still think this is a bug, it's a bug in matchable.  I think
there's no upstream repository for it (just the code on
So you can report it on, assign it to "ashinn" (that's
matchable's author).


Attachment: signature.asc
Description: PGP signature

reply via email to

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