GNU bug report logs - #9567
curious match bug (?)

Previous Next

Package: guile;

Reported by: Andy Wingo <wingo <at> pobox.com>

Date: Wed, 21 Sep 2011 03:36:01 UTC

Severity: normal

Done: ludo <at> gnu.org (Ludovic Courtès)

Bug is archived. No further changes may be made.

Full log


Message #17 received at 9567 <at> debbugs.gnu.org (full text, mbox):

From: Andy Wingo <wingo <at> pobox.com>
To: ludo <at> gnu.org (Ludovic Courtès)
Cc: 9567 <at> debbugs.gnu.org
Subject: Re: bug#9567: curious match bug (?)
Date: Sat, 24 Sep 2011 16:51:00 +0200
On Fri 23 Sep 2011 16:45, ludo <at> gnu.org (Ludovic Courtès) writes:

> Could it be a feature?
>
>   (let ((pat '('a _ ...)))
>     (match '(a b c) (pat #t)))
>   => #t

`match' compiles patterns to Scheme code at macro expansion time.  It
doesn't do runtime matching.  Are you thinking that `pat' is being used
as a pattern?  It is not:

  (let ((pat '('b _ ...)))
    (match '(a b c) (pat #t)))
  => #t
  
If it were a pattern, it would not match.  It is a bug IMO.

Andy
-- 
http://wingolog.org/




This bug report was last modified 13 years and 222 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.