From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Stephen Compall <stephen.compall@gmail.com> Newsgroups: gmane.lisp.guile.user Subject: Re: syntax-case guards Date: Sun, 3 Feb 2013 19:52:09 -0500 Message-ID: <CACs3V9XOXW8uzphWZSkGdvd912qzUqYj7heuU-R6Xn8M1RmRcw@mail.gmail.com> References: <CA+XASoXBELxXxy=Br9cAjmoVra5Q4rdb4v5LafCwK4g=RQpWAg@mail.gmail.com> NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: multipart/alternative; boundary=047d7bdc1146bc394d04d4db8038 X-Trace: ger.gmane.org 1359953494 18560 80.91.229.3 (4 Feb 2013 04:51:34 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Mon, 4 Feb 2013 04:51:34 +0000 (UTC) Cc: guile-user <guile-user@gnu.org> To: =?UTF-8?Q?Aleix_Conchillo_Flaqu=C3=A9?= <aconchillo@gmail.com> Original-X-From: guile-user-bounces+guile-user=m.gmane.org@gnu.org Mon Feb 04 05:51:55 2013 Return-path: <guile-user-bounces+guile-user=m.gmane.org@gnu.org> Envelope-to: guile-user@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by plane.gmane.org with esmtp (Exim 4.69) (envelope-from <guile-user-bounces+guile-user=m.gmane.org@gnu.org>) id 1U2E24-0007X3-9w for guile-user@m.gmane.org; Mon, 04 Feb 2013 05:51:52 +0100 Original-Received: from localhost ([::1]:45989 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from <guile-user-bounces+guile-user=m.gmane.org@gnu.org>) id 1U2E1l-00022y-Sj for guile-user@m.gmane.org; Sun, 03 Feb 2013 23:51:33 -0500 Original-Received: from eggs.gnu.org ([208.118.235.92]:48060) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from <stephen.compall@gmail.com>) id 1U2AI9-00016b-JN for guile-user@gnu.org; Sun, 03 Feb 2013 19:52:16 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from <stephen.compall@gmail.com>) id 1U2AI6-0005Vz-Hw for guile-user@gnu.org; Sun, 03 Feb 2013 19:52:13 -0500 Original-Received: from mail-qe0-f53.google.com ([209.85.128.53]:53075) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from <stephen.compall@gmail.com>) id 1U2AI6-0005Vp-Cy for guile-user@gnu.org; Sun, 03 Feb 2013 19:52:10 -0500 Original-Received: by mail-qe0-f53.google.com with SMTP id 1so2636812qee.12 for <guile-user@gnu.org>; Sun, 03 Feb 2013 16:52:09 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:x-received:in-reply-to:references:date:message-id :subject:from:to:cc:content-type; bh=O795RWBUhcpMKMzxND8NFjQFXWzUB4hSF8oVx1zas/8=; b=OJWgcgiRzGs9kq3N5Qc0OxwteW2rhdr9ru0cw3rruBgWhdzs8rZosUOg0P9QGtxrg/ v2GxgC+Xon5dM4rralJYXPw++rxtUAdINkw+VJM99MM8RcKeS+AgXUAo5oQDccE5FzCE uGLkuyXdUo0FuBhJ4R6QE8YMxUxIOIZrJ7F5Bgo2fV/J/NeVI8+p1C7gt+nEwqZZY/42 rIa1VGz0E+bKAGC6aYYckz/vRYi6RzGzp+SR9l9lFlBLkcrATXMtsZ+Y+Ea9as9EC/fH D/4EF+kT+hoyXRbMpZ3Yo6mxm07zMrd2j0ZlKg+y7vp/udbxikV3t/L+tbMWESk2DaoX 07HQ== X-Received: by 10.49.74.73 with SMTP id r9mr20115269qev.44.1359939129587; Sun, 03 Feb 2013 16:52:09 -0800 (PST) Original-Received: by 10.49.133.5 with HTTP; Sun, 3 Feb 2013 16:52:09 -0800 (PST) Original-Received: by 10.49.133.5 with HTTP; Sun, 3 Feb 2013 16:52:09 -0800 (PST) In-Reply-To: <CA+XASoXBELxXxy=Br9cAjmoVra5Q4rdb4v5LafCwK4g=RQpWAg@mail.gmail.com> X-detected-operating-system: by eggs.gnu.org: GNU/Linux 3.x [fuzzy] X-Received-From: 209.85.128.53 X-Mailman-Approved-At: Sun, 03 Feb 2013 23:51:29 -0500 X-BeenThere: guile-user@gnu.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: General Guile related discussions <guile-user.gnu.org> List-Unsubscribe: <https://lists.gnu.org/mailman/options/guile-user>, <mailto:guile-user-request@gnu.org?subject=unsubscribe> List-Archive: <http://lists.gnu.org/archive/html/guile-user> List-Post: <mailto:guile-user@gnu.org> List-Help: <mailto:guile-user-request@gnu.org?subject=help> List-Subscribe: <https://lists.gnu.org/mailman/listinfo/guile-user>, <mailto:guile-user-request@gnu.org?subject=subscribe> Errors-To: guile-user-bounces+guile-user=m.gmane.org@gnu.org Original-Sender: guile-user-bounces+guile-user=m.gmane.org@gnu.org Xref: news.gmane.org gmane.lisp.guile.user:10009 Archived-At: <http://permalink.gmane.org/gmane.lisp.guile.user/10009> --047d7bdc1146bc394d04d4db8038 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable On Feb 3, 2013 6:56 PM, "Aleix Conchillo Flaqu=C3=A9" <aconchillo@gmail.com= > wrote: > So I have something like, > > ((_ (struct (k v) ...)) > (string? (syntax->datum #'k)) > exp) > > And I want k to be a string. However, I am getting this error: > > missing ellipsis in form (syntax k) The error is correct; k lives in single-ellipsis world. What should k mean to syntax->datum? The first k? The last k? Try changing #'k to #'(k ...), and adjusting the guard to deal with list of k, such as you will get, instead of just k. -- Stephen Compall If anyone in the MSA is online, you should watch this flythrough. --047d7bdc1146bc394d04d4db8038 Content-Type: text/html; charset=UTF-8 Content-Transfer-Encoding: quoted-printable <p>On Feb 3, 2013 6:56 PM, "Aleix Conchillo Flaqu=C3=A9" <<a h= ref=3D"mailto:aconchillo@gmail.com">aconchillo@gmail.com</a>> wrote:<br> > So I have something like,<br> ><br> > =C2=A0 =C2=A0 =C2=A0 ((_ (struct (k v) ...))<br> > =C2=A0 =C2=A0 =C2=A0 =C2=A0(string? (syntax->datum #'k))<br> > =C2=A0 =C2=A0 =C2=A0 =C2=A0exp)<br> ><br> > And I want k to be a string. However, I am getting this error:<br> ><br> > missing ellipsis in form (syntax k)</p> <p>The error is correct; k lives in single-ellipsis world.=C2=A0 What shoul= d k mean to syntax->datum?=C2=A0 The first k?=C2=A0 The last k?</p> <p>Try changing #'k to #'(k ...), and adjusting the guard to deal w= ith list of k, such as you will get, instead of just k.</p> <p>--<br> Stephen Compall<br> If anyone in the MSA is online, you should watch this flythrough.</p> --047d7bdc1146bc394d04d4db8038--