From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED!not-for-mail From: =?UTF-8?Q?Elias_M=C3=A5rtenson?= Newsgroups: gmane.emacs.devel Subject: Error using iterators: cps-internal-yield Date: Sat, 2 Jun 2018 00:37:09 +0800 Message-ID: NNTP-Posting-Host: blaine.gmane.org Mime-Version: 1.0 Content-Type: multipart/alternative; boundary="000000000000fd0084056d9731e0" X-Trace: blaine.gmane.org 1527872243 32484 195.159.176.226 (1 Jun 2018 16:57:23 GMT) X-Complaints-To: usenet@blaine.gmane.org NNTP-Posting-Date: Fri, 1 Jun 2018 16:57:23 +0000 (UTC) To: emacs-devel Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Fri Jun 01 18:57:19 2018 Return-path: Envelope-to: ged-emacs-devel@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by blaine.gmane.org with esmtp (Exim 4.84_2) (envelope-from ) id 1fOnMd-0008Lo-00 for ged-emacs-devel@m.gmane.org; Fri, 01 Jun 2018 18:57:19 +0200 Original-Received: from localhost ([::1]:56746 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1fOnOk-00028N-41 for ged-emacs-devel@m.gmane.org; Fri, 01 Jun 2018 12:59:30 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:41264) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1fOn3A-00020B-CY for emacs-devel@gnu.org; Fri, 01 Jun 2018 12:37:15 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1fOn39-0003xc-4x for emacs-devel@gnu.org; Fri, 01 Jun 2018 12:37:12 -0400 Original-Received: from mail-io0-x235.google.com ([2607:f8b0:4001:c06::235]:44552) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1fOn38-0003wz-WF for emacs-devel@gnu.org; Fri, 01 Jun 2018 12:37:11 -0400 Original-Received: by mail-io0-x235.google.com with SMTP id g7-v6so6530371ioh.11 for ; Fri, 01 Jun 2018 09:37:10 -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=KSk4pdJLF2XUclvqh4EWUF/H9eWzYIzjCHc4rjdqmZ8=; b=TBWQWIBzkH9Pys0Es7qKLtcJV96ebjsuT+iDBROgIVnLuHMKy4atYvihd08Vec5zTi jWI4KYgdweGzJ0iNISG1332QSgmYtIh2U9pCX9PJgcso/26oeS8ysyXYntw+6PQ8X3k7 8bsPJbG8/eE/jlJODH6zmU27dxqSYF79EoGmu5hjAx59t8OdLVILTjA4ExUsT+pagIPH 0UmE49N8uTGjZHCJpLzlq/2t2VvFJoPcmDHvJ7lGbAyb1KSR7fU10avEQbWyYGXOf9bn SLjA9seGfFGPNHIYGSkYtdAdEFLXTyZ2685nX6YOQfVSQZLmWciBg5/gOHqrJlyjEyAe ch3Q== 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=KSk4pdJLF2XUclvqh4EWUF/H9eWzYIzjCHc4rjdqmZ8=; b=WqKv0kXveVevH8MCsS42xZF037KZdM4ctNmcYNAS4+EsoFYHvknw5Pnd9wh04ITWPf ZgAzbu9YcKmy7BPql4resKqe7rAQLTxoQ8awYV6+C5M7Cu8iHSFnX14Z8tdDKj3KHYhg +iVSnRQ8tvdwuD6HUIi/YBHTwmZStibTXZUGvlZ8p4lfJFxpvtM2Sr6OWnyOg0ZZYmX+ N7V+vx28PGiSDsnxRqRbZ5rL3qb1MCTTx7AEKQqTvki4Rq6QT0GCcQTjKuOi45I/jFGp Dn1HLd/MiUsXG9A4/VK4FG0EuPzEBYablkQMsgWbjIfh50pjb7ts+5RhRCk7AEOnLa8r xhhQ== X-Gm-Message-State: APt69E1WkIHgtFrXIxJRIPI/UTnZEdX3Ey49jB/15EcmvULV5yBvx//T At5GlZMr5gL+gASfs+t8TpiEU45Tc+ypj4s9U2WmIpm6 X-Google-Smtp-Source: ADUXVKJVrizTseRILXYCLzwpMh4m2WWStvEA8EKR824zCzl9HH4oNw5QDFga/e+bPlvdRCJen0NYOg+KO0QZ1bdeqew= X-Received: by 2002:a6b:32d4:: with SMTP id y203-v6mr2230849ioy.107.1527871029703; Fri, 01 Jun 2018 09:37:09 -0700 (PDT) Original-Received: by 2002:a6b:c344:0:0:0:0:0 with HTTP; Fri, 1 Jun 2018 09:37:09 -0700 (PDT) X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 2607:f8b0:4001:c06::235 X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Original-Sender: "Emacs-devel" Xref: news.gmane.org gmane.emacs.devel:225897 Archived-At: --000000000000fd0084056d9731e0 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable I was trying out the new iterator feature, and managed to write a small test program that gives an error. I presume there is a problem with how the macro interacts with cl-labels. Here's the test code: (iter-defun bar () (cl-labels ((foo () (iter-yield 'a) (iter-yield 'b) (iter-yield 'c) (iter-yield 'd))) (foo) (foo))) (let ((x (bar))) (loop repeat 8 collect (iter-next x))) When run, it gives the following error: *** Eval error *** Symbol=E2=80=99s function definition is void: cps-inter= nal-yield Regards, Elias --000000000000fd0084056d9731e0 Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable
I was trying out the new iterator feature, and managed to = write a small test program that gives an error. I presume there is a proble= m with how the macro interacts with cl-labels.

Here'= s the test code:

(iter-defun bar ()
=C2=A0 (cl-labels ((foo ()
=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 = =C2=A0 =C2=A0 =C2=A0 (iter-yield 'a)
=C2=A0 =C2=A0 =C2=A0 =C2= =A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 (iter-yield 'b)
=C2=A0 =C2=A0= =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 (iter-yield 'c)
= =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 (iter-yield 'd)= ))
=C2=A0 =C2=A0 (foo)
=C2=A0 =C2=A0 (foo)))
=
(let ((x (bar)))
=C2=A0 (loop repeat 8
= =C2=A0 =C2=A0 =C2=A0 =C2=A0 collect (iter-next x)))

When run, it gives the following error:

**= * Eval error ***=C2=A0 Symbol=E2=80=99s function definition is void: cps-in= ternal-yield

Regards,
Elias
--000000000000fd0084056d9731e0--