From debbugs-submit-bounces@debbugs.gnu.org Wed Sep 26 16:03:24 2018 Received: (at submit) by debbugs.gnu.org; 26 Sep 2018 20:03:24 +0000 Received: from localhost ([127.0.0.1]:55684 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1g5G1q-0006Du-LT for submit@debbugs.gnu.org; Wed, 26 Sep 2018 16:03:24 -0400 Received: from eggs.gnu.org ([208.118.235.92]:39842) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1g5G1n-0006De-M9 for submit@debbugs.gnu.org; Wed, 26 Sep 2018 16:03:21 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1g5G1d-0005Pz-Qz for submit@debbugs.gnu.org; Wed, 26 Sep 2018 16:03:11 -0400 X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on eggs.gnu.org X-Spam-Level: X-Spam-Status: No, score=-0.5 required=5.0 tests=BAYES_05,FREEMAIL_FROM, HTML_MESSAGE autolearn=disabled version=3.3.2 Received: from lists.gnu.org ([2001:4830:134:3::11]:35774) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1g5G1b-0005PH-HY for submit@debbugs.gnu.org; Wed, 26 Sep 2018 16:03:08 -0400 Received: from eggs.gnu.org ([2001:4830:134:3::10]:49434) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1g5G1a-00089l-SH for bug-guile@gnu.org; Wed, 26 Sep 2018 16:03:07 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1g5G1Y-0005OV-WD for bug-guile@gnu.org; Wed, 26 Sep 2018 16:03:06 -0400 Received: from mail-ua1-x936.google.com ([2607:f8b0:4864:20::936]:35891) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1g5G1Y-0005O9-RM for bug-guile@gnu.org; Wed, 26 Sep 2018 16:03:04 -0400 Received: by mail-ua1-x936.google.com with SMTP id m26-v6so91863uaq.3 for ; Wed, 26 Sep 2018 13:03:03 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:from:date:message-id:subject:to; bh=bhg/olMdDwDVUkpue/mkOR2paynCEPeLVG21xEoTCa4=; b=Ie78Y5zMGBj5jeX1geUbhjVJQTISXO94ozWC6XsNBv0UzhY5vvCaHv5Ty+AYTAc04A FtORv+3iyvK+3U1F2owMctxSWS3lHxmxlIIDy6oJYUoG93b3cojRctQwIpYPqA05dYl3 PWSP8q7rhf2483B3FG1lTglnQXNkoWoHhh9WrWAFfGPj0iDE4jdUqHj3FNR9bRPq9Jcc 31aA9QWbyeosECxbgVia+k9i1esoTp8tmRwCTUo+3qEdY3/0nQHPOSeAcagWldBi4DxY z3iLA/xHWD8VQFbdFZ7087Qjs11f7sMkfELXN4Q6pbC9uHbobr79je3p8cmafxOjdDD1 sYXw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:from:date:message-id:subject:to; bh=bhg/olMdDwDVUkpue/mkOR2paynCEPeLVG21xEoTCa4=; b=q534zfLZ4xE2NYzxaz1R/5etLJMSGpq+W972F+1grEmkYX+YAHvfFlDQrZOCQdpO5I sZrG0oDIxsOj8qI+D7448u3N+Wy43mrGQBu8/sw+uApYDPTbWbrdRgwsWjBO9Choo/bp YytqkgnT/zP5oXq8M0+SaBZ3JHBcLozOikDUMxfWSYExjt/K0p984RgAAe+d1lCAASF0 fRDLyuZCpNUC8YI4r99na88kvj3DGrTWyKo7FMU03BUGsKFRCLURZPoN2l2ZipAPS2cS I8f3F8BhDHyRmLN42RiV6nf1YJBrg38U1hZTcpocLt1A8gpTrNWT4d+ktLM7KPddKKUV 7oqw== X-Gm-Message-State: ABuFfohiWw098OyNymW3A0xK/rmX9t8tiF+oxhejtNJDXSV15FpcD5wZ R1IboLbd7i0H1G3jnISKnkb+3gaUuIiJECJXwR1a12zJ X-Google-Smtp-Source: ACcGV624FJPfXBEbOMkRTK684p0X9aopjNxVYceEKFnVh7gTEFrD3fx7NgWYUS/Z4xD+aV8mv6Fw7of3LA3pR7kzLFI= X-Received: by 2002:ab0:2258:: with SMTP id z24-v6mr2462562uan.127.1537992182387; Wed, 26 Sep 2018 13:03:02 -0700 (PDT) MIME-Version: 1.0 From: Stefan Israelsson Tampe Date: Wed, 26 Sep 2018 22:02:51 +0200 Message-ID: Subject: Wrong macro expansion in eval To: bug-guile@gnu.org Content-Type: multipart/alternative; boundary="000000000000b2de8a0576cbb560" X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6.x X-Received-From: 2001:4830:134:3::11 X-Spam-Score: -4.0 (----) X-Debbugs-Envelope-To: submit X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -5.0 (-----) --000000000000b2de8a0576cbb560 Content-Type: text/plain; charset="UTF-8" This for guile 2.4 and master, > (eval `(let-syntax ((f (lambda (x) ,#'(+ (pk 'a 1) 2)))) f) (cu rrent-module)) ;;; (# 1) But without eval: > (let-syntax ((f (lambda (x) #'(+ (pk 'a 1) 2)))) f) ;;; (a 1) --000000000000b2de8a0576cbb560 Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable
This for guile 2.4 and master,

> (eval `(let-syntax ((f (lambda (x) ,= #'(+ (pk 'a 1) 2)))) f) (current-module))=C2=A0

;;; (#<syntax a> 1)


But without eval:
<= span style=3D"font-family:monospace">>=C2=A0(let-syntax ((f (lambda (x) #'(+ (pk = 'a 1) 2)))) f)=C2=A0=C2=A0

;;; (a 1)

--000000000000b2de8a0576cbb560-- From debbugs-submit-bounces@debbugs.gnu.org Wed Sep 26 22:16:23 2018 Received: (at 32847) by debbugs.gnu.org; 27 Sep 2018 02:16:23 +0000 Received: from localhost ([127.0.0.1]:55813 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1g5Lqp-0000Xo-LZ for submit@debbugs.gnu.org; Wed, 26 Sep 2018 22:16:23 -0400 Received: from world.peace.net ([64.112.178.59]:39608) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1g5Lqo-0000Xc-69 for 32847@debbugs.gnu.org; Wed, 26 Sep 2018 22:16:22 -0400 Received: from mhw by world.peace.net with esmtpsa (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.89) (envelope-from ) id 1g5Lqi-0002sC-A9; Wed, 26 Sep 2018 22:16:16 -0400 From: Mark H Weaver To: Stefan Israelsson Tampe Subject: Re: bug#32847: Wrong macro expansion in eval References: Date: Wed, 26 Sep 2018 22:16:06 -0400 In-Reply-To: (Stefan Israelsson Tampe's message of "Wed, 26 Sep 2018 22:02:51 +0200") Message-ID: <875zyrelcp.fsf@netris.org> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/26.1 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain X-Spam-Score: 0.0 (/) X-Debbugs-Envelope-To: 32847 Cc: 32847@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.0 (-) Hi Stefan, Stefan Israelsson Tampe writes: > This for guile 2.4 and master, > >> (eval `(let-syntax ((f (lambda (x) ,#'(+ (pk 'a 1) 2)))) f) (current-module)) > > ;;; (# 1) > > But without eval: >> (let-syntax ((f (lambda (x) #'(+ (pk 'a 1) 2)))) f) > > ;;; (a 1) I think the mistake is in your code above. In the first case, what you want is this: (eval `(let-syntax ((f (lambda (x) ,'#'(+ (pk 'a 1) 2)))) f) (current-module)) Note the addition of a quote (') between the unquote (,) and syntax (#') above. The expression that follows unquote (,) should evaluate to an s-expression. In this case, you want it to evaluate to the s-expression #'(+ (pk 'a 1) 2), i.e. (syntax (+ (pk 'a 1) 2)), i.e. a list with two elements, the first being the symbol 'syntax'. But that's not what you're doing above. Instead, you are returning the syntax object itself, which is being spliced directly into the code. Does that make sense? Mark From debbugs-submit-bounces@debbugs.gnu.org Thu Sep 27 04:33:20 2018 Received: (at 32847) by debbugs.gnu.org; 27 Sep 2018 08:33:20 +0000 Received: from localhost ([127.0.0.1]:55883 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1g5Rjb-0003gF-SW for submit@debbugs.gnu.org; Thu, 27 Sep 2018 04:33:20 -0400 Received: from mail-vs1-f43.google.com ([209.85.217.43]:38505) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1g5RjZ-0003g2-Rj for 32847@debbugs.gnu.org; Thu, 27 Sep 2018 04:33:18 -0400 Received: by mail-vs1-f43.google.com with SMTP id y11-v6so1017193vso.5 for <32847@debbugs.gnu.org>; Thu, 27 Sep 2018 01:33:17 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=UfnyrWrIcW9TRAvO3Ngw96oouNBGpcUDJHXg6YF+eQs=; b=rvxmdRSBCOjAd7ppboFbMr4jeCYhEB9dQNkVwUMxesX2XwS6d97l3QuByL0YMfbLPr hmex1pHHPL5yFQ1X7AXlogK6M9qMra1Svw8HDu2OxAPNEUcNuQxkykVIEvTKec2u7PmA P5JVxjtpL+z5tlFC2LaEqIb77/HhvuQ0uFatmgfL3T9MPO9FzZz3d02CktMOFZQnnhvs D153d4+lOwLmzdvc4CwCH91n4AvPArLwBJ9oH3I1KXaeWoxVLWL4ZlsARvniU4swdQ2W lIzEZ0sR8Um5VFQS+InTDXPZI2CZPzCpQpx7ulr3E/nw84yyZv1/l0c5F2jP1J9v5TiP m7TQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=UfnyrWrIcW9TRAvO3Ngw96oouNBGpcUDJHXg6YF+eQs=; b=NYDb1wd3E3/STvYtdXEh9Abh00BcLcW+oJvGAcY4wvCiibZw2vj7jb9rgxjntF/854 o4YBto9CzSesvH/5BaT7PqKHGkGYXtcKjPNfSeuowel/v1bp1kfQrELzpPW+TznbEmGc YitYubhOJXAydGLnnxo2qH/StIcTSp76VLR4RsmCmSchbuXuZx+y5xmMXJooM7VNGaTm UA6Xk4OIoSy4+JDK5Vfx6Ara29mgJGEytbU1jXgF6JXbSRT57yImwOxtgqAUTIY4/1je 8YNKgBfOJA4HlgFHuSY2qV9XiV5vtn9Nk3uL2JLRHz12S4kbqNBHOGQl1jfTjSFuMScJ gBDQ== X-Gm-Message-State: ABuFfoh7i8Is8viFl0njr4CWeacdASubTun297ywpOIga+Ta1WqXzdvy PRKUNfT79vtZWpqCM01xDUZ5ZwcSBarHcsOU364= X-Google-Smtp-Source: ACcGV60h0lE1JyQu6TzpnW9BzmINSxeMhjHE10y++Z3yIKgKziU9A/+co4P/2/CRMM9c3GvN5w3kQZTVm2vCVoGZZj4= X-Received: by 2002:a67:d803:: with SMTP id e3-v6mr3032775vsj.163.1538037192069; Thu, 27 Sep 2018 01:33:12 -0700 (PDT) MIME-Version: 1.0 References: <875zyrelcp.fsf@netris.org> In-Reply-To: <875zyrelcp.fsf@netris.org> From: Stefan Israelsson Tampe Date: Thu, 27 Sep 2018 10:33:00 +0200 Message-ID: Subject: Re: bug#32847: Wrong macro expansion in eval To: Mark H Weaver Content-Type: multipart/alternative; boundary="0000000000007c19070576d630ce" X-Spam-Score: 0.0 (/) X-Debbugs-Envelope-To: 32847 Cc: 32847@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.0 (-) --0000000000007c19070576d630ce Content-Type: text/plain; charset="UTF-8" yes that makes sense. thanks! On Thu, Sep 27, 2018 at 4:16 AM Mark H Weaver wrote: > Hi Stefan, > > Stefan Israelsson Tampe writes: > > > This for guile 2.4 and master, > > > >> (eval `(let-syntax ((f (lambda (x) ,#'(+ (pk 'a 1) 2)))) f) > (current-module)) > > > > ;;; (# 1) > > > > But without eval: > >> (let-syntax ((f (lambda (x) #'(+ (pk 'a 1) 2)))) f) > > > > ;;; (a 1) > > I think the mistake is in your code above. In the first case, what you > want is this: > > (eval `(let-syntax ((f (lambda (x) ,'#'(+ (pk 'a 1) 2)))) f) > (current-module)) > > Note the addition of a quote (') between the unquote (,) and syntax (#') > above. > > The expression that follows unquote (,) should evaluate to an > s-expression. In this case, you want it to evaluate to the s-expression > #'(+ (pk 'a 1) 2), i.e. (syntax (+ (pk 'a 1) 2)), i.e. a list with two > elements, the first being the symbol 'syntax'. But that's not what > you're doing above. Instead, you are returning the syntax object > itself, which is being spliced directly into the code. > > Does that make sense? > > Mark > --0000000000007c19070576d630ce Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable
yes that makes sense. thanks!

On Thu, Sep 27, 2018 at 4:16 AM Mark H Weaver <= mhw@netris.org> wrote:
Hi Stefan,

Stefan Israelsson Tampe <stefan.itampe@gmail.com> writes:

> This for guile 2.4 and master,
>
>> (eval `(let-syntax ((f (lambda (x) ,#'(+ (pk 'a 1) 2)))) f= ) (current-module))
>
> ;;; (#<syntax a> 1)
>
> But without eval:
>> (let-syntax ((f (lambda (x) #'(+ (pk 'a 1) 2)))) f)=C2=A0 =
>
> ;;; (a 1)

I think the mistake is in your code above.=C2=A0 In the first case, what yo= u
want is this:

=C2=A0 (eval `(let-syntax ((f (lambda (x) ,'#'(+ (pk 'a 1) 2)))= ) f)
=C2=A0 =C2=A0 =C2=A0 =C2=A0 (current-module))

Note the addition of a quote (') between the unquote (,) and syntax (#&= #39;)
above.

The expression that follows unquote (,) should evaluate to an
s-expression.=C2=A0 In this case, you want it to evaluate to the s-expressi= on
#'(+ (pk 'a 1) 2), i.e. (syntax (+ (pk 'a 1) 2)), i.e. a list w= ith two
elements, the first being the symbol 'syntax'.=C2=A0 But that's= not what
you're doing above.=C2=A0 Instead, you are returning the syntax object<= br> itself, which is being spliced directly into the code.

Does that make sense?

=C2=A0 =C2=A0 =C2=A0 =C2=A0Mark
--0000000000007c19070576d630ce-- From debbugs-submit-bounces@debbugs.gnu.org Thu Sep 27 05:04:48 2018 Received: (at control) by debbugs.gnu.org; 27 Sep 2018 09:04:48 +0000 Received: from localhost ([127.0.0.1]:55889 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1g5SE4-0004Qf-HT for submit@debbugs.gnu.org; Thu, 27 Sep 2018 05:04:48 -0400 Received: from world.peace.net ([64.112.178.59]:40962) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1g5SE3-0004QS-63 for control@debbugs.gnu.org; Thu, 27 Sep 2018 05:04:47 -0400 Received: from mhw by world.peace.net with esmtpsa (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.89) (envelope-from ) id 1g5SDx-0004n1-CK; Thu, 27 Sep 2018 05:04:41 -0400 From: Mark H Weaver To: control@debbugs.gnu.org Date: Thu, 27 Sep 2018 05:04:31 -0400 Message-ID: <878t3ncnvk.fsf@netris.org> MIME-Version: 1.0 Content-Type: text/plain X-Spam-Score: 2.0 (++) X-Spam-Report: Spam detection software, running on the system "debbugs.gnu.org", has NOT identified this incoming email as spam. The original message has been attached to this so you can view it or label similar future email. If you have any questions, see the administrator of that system for details. Content preview: tags 32847 + notabug close 32847 [...] Content analysis details: (2.0 points, 10.0 required) pts rule name description ---- ---------------------- -------------------------------------------------- 1.8 MISSING_SUBJECT Missing Subject: header 0.2 NO_SUBJECT Extra score for no subject X-Debbugs-Envelope-To: control X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: 1.0 (+) tags 32847 + notabug close 32847 From unknown Sun Jun 22 11:48:29 2025 Received: (at fakecontrol) by fakecontrolmessage; To: internal_control@debbugs.gnu.org From: Debbugs Internal Request Subject: Internal Control Message-Id: bug archived. Date: Thu, 25 Oct 2018 11:24:05 +0000 User-Agent: Fakemail v42.6.9 # This is a fake control message. # # The action: # bug archived. thanks # This fakemail brought to you by your local debbugs # administrator