From unknown Sun Jun 15 13:00:20 2025 Content-Disposition: inline Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 X-Mailer: MIME-tools 5.509 (Entity 5.509) Content-Type: text/plain; charset=utf-8 From: bug#22142 <22142@debbugs.gnu.org> To: bug#22142 <22142@debbugs.gnu.org> Subject: Status: A bug with define-syntax Reply-To: bug#22142 <22142@debbugs.gnu.org> Date: Sun, 15 Jun 2025 20:00:20 +0000 retitle 22142 A bug with define-syntax reassign 22142 guile submitter 22142 Tommi H=C3=B6yn=C3=A4l=C3=A4nmaa severity 22142 normal thanks From debbugs-submit-bounces@debbugs.gnu.org Fri Dec 11 12:28:28 2015 Received: (at submit) by debbugs.gnu.org; 11 Dec 2015 17:28:28 +0000 Received: from localhost ([127.0.0.1]:40678 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84) (envelope-from ) id 1a7RUa-0007es-DR for submit@debbugs.gnu.org; Fri, 11 Dec 2015 12:28:28 -0500 Received: from eggs.gnu.org ([208.118.235.92]:39830) by debbugs.gnu.org with esmtp (Exim 4.84) (envelope-from ) id 1a7RSS-0007aE-ME for submit@debbugs.gnu.org; Fri, 11 Dec 2015 12:26:17 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1a7NiF-00052N-Ck for submit@debbugs.gnu.org; Fri, 11 Dec 2015 08:26:20 -0500 X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on eggs.gnu.org X-Spam-Level: X-Spam-Status: No, score=0.8 required=5.0 tests=BAYES_50,FREEMAIL_FROM, HTML_MESSAGE,T_DKIM_INVALID autolearn=disabled version=3.3.2 Received: from lists.gnu.org ([2001:4830:134:3::11]:55564) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1a7NiF-00052F-2c for submit@debbugs.gnu.org; Fri, 11 Dec 2015 08:26:19 -0500 Received: from eggs.gnu.org ([2001:4830:134:3::10]:42733) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1a7NiD-0005PS-Ej for bug-guile@gnu.org; Fri, 11 Dec 2015 08:26:18 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1a7NiB-00051C-S9 for bug-guile@gnu.org; Fri, 11 Dec 2015 08:26:17 -0500 Received: from mail-io0-x230.google.com ([2607:f8b0:4001:c06::230]:34125) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1a7NiB-000512-Mi for bug-guile@gnu.org; Fri, 11 Dec 2015 08:26:15 -0500 Received: by ioir85 with SMTP id r85so126421290ioi.1 for ; Fri, 11 Dec 2015 05:26:14 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:date:message-id:subject:from:to:content-type; bh=69mvBk3RkNI7TA6d4CWmk+cv2F7fcg94ZUnRlaGZWrg=; b=gMG58DjNVo7pNaV1+E4Fj7sCJs3zdqTrTUBI1CZqljdT0uPVMdNMtjk73meKt5QPr0 vWPG7S+aJyXm2IKvPCpsPUhbhOJv8aToY5TMWAiPI2XVEXzkJi+yG4nH1w2u7AD8WfUg 9UYIVrFx3K0H7cKarfx/zfJTq5ujmt5dqjFrZToLoHSCy0PILgfDfe1Tn5cjL4nYUXKh zVUxSVkl1fX7PlwZySbtWbLAU/Z59DuVDvBdT+sDgDKTde4SjnWG2YG2Q/8wKmXG0OTf Vjs1KAvaEeG91xK1gQJW2+cUOl1iLvEmySVLmJErcSVokiEyxdz9iQJk2GwBuvL60vcK 2jaw== MIME-Version: 1.0 X-Received: by 10.107.26.144 with SMTP id a138mr17284693ioa.100.1449840374745; Fri, 11 Dec 2015 05:26:14 -0800 (PST) Received: by 10.107.142.135 with HTTP; Fri, 11 Dec 2015 05:26:14 -0800 (PST) Date: Fri, 11 Dec 2015 15:26:14 +0200 Message-ID: Subject: A bug with define-syntax From: =?UTF-8?B?VG9tbWkgSMO2eW7DpGzDpG5tYWE=?= To: bug-guile@gnu.org Content-Type: multipart/alternative; boundary=001a113ff60c848eda05269f4472 X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] 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-Mailman-Approved-At: Fri, 11 Dec 2015 12:28:26 -0500 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: -4.0 (----) --001a113ff60c848eda05269f4472 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable I get the following error message: --- cut here --- ../../translator/theme-d-compile.scm -m .. -o hello-world.tcp hello-world.thp ;;; note: source file /etc/theme-d-config.scm ;;; newer than compiled /home/tohoyn/.cache/guile/ccache/2.0-LE-8-2.0/etc/theme-d-config.scm.go ;;; note: auto-compilation is enabled, set GUILE_AUTO_COMPILE=3D0 ;;; or pass the --no-auto-compile argument to disable. ;;; compiling /etc/theme-d-config.scm ;;; compiled /home/tohoyn/.cache/guile/ccache/2.0-LE-8-2.0/etc/theme-d-config.scm.go Unit compiled successfully. ../../translator/theme-d-link.scm -m .. -o hello-world.scm hello-world.tcp Backtrace: In /usr/local/share/theme-d/translator/theme-d-parametrized-definitions.scm= : 693: 19 [do-bind-type-vars1 #(# # # ...) () ...] 654: 18 [do-bind-type-vars0 #(# # # ...) () ...] 378: 17 [do-bind-type-vars00 #(# # # ...) () ...] In srfi/srfi-1.scm: 576: 16 [map # ...] In /usr/local/share/theme-d/translator/theme-d-parametrized-definitions.scm= : 383: 15 [# #] 654: 14 [do-bind-type-vars0 #(# # # ...) () ...] 267: 13 [do-bind-type-vars00 #(# # # ...) () ...] 3107: 12 [inst-bind-procedure #(# # # ...) () ...] In /usr/local/share/theme-d/translator/theme-d-expression-cloning.scm: 459: 11 [rebind-local-variables1 # # #] 417: 10 [rebind-local-variables0 # # # ...] 319: 9 [rebind-local-variables00 # # # ...] In srfi/srfi-1.scm: 576: 8 [map # ...] In /usr/local/share/theme-d/translator/theme-d-expression-cloning.scm: 417: 7 [rebind-local-variables0 # # # ...] 319: 6 [rebind-local-variables00 # # # ...] In srfi/srfi-1.scm: 578: 5 [map # ...] In /usr/local/share/theme-d/translator/theme-d-expression-cloning.scm: 417: 4 [rebind-local-variables0 # # # ...] 330: 3 [rebind-local-variables00 # # # ...] 3401: 2 [clone-with-branches # # # ...] In /usr/local/share/theme-d/translator/theme-d-expression-rebinding.scm: 10: 1 [rebind-cond-expression # # # ...] In unknown file: ?: 0 [# #t] ERROR: In procedure #: ERROR: Wrong type to apply: # make: *** [hello-world.scm] Virhe 1 --- cut here --- The code should compile. Steps to reproduce the bug: 1. Download http://www.iki.fi/tohoyn/theme/th-scheme-utilities-1.1.tar.bz2 and http://www.iki.fi/tohoyn/theme/theme-d-0.9.1.tar.bz2 2. Unpack and install the packages according to the instructions in the packages. 3. Go to the subdirectory theme-d/theme-d-code/examples and give command make hello-world.scm NOTE: Use TH Scheme utilities 1.1 instead of TH Scheme Utilities 1.1x. Version 1.1x compiles OK. I have used guile version 2.0.9 in Ubuntu 14.04. Yours sincerely, Tommi H=C3=B6yn=C3=A4l=C3=A4nmaa --001a113ff60c848eda05269f4472 Content-Type: text/html; charset=UTF-8 Content-Transfer-Encoding: quoted-printable
I get t= he following error message:

--- cut here ---
../../translator/theme-d-compile.scm -m ..
=C2=A0 -o hello-world.tcp hello-w= orld.thp
;;; note: source file /etc/theme-d-config.scm
;;;
=C2=A0=C2=A0=C2=A0=C2=A0= =C2=A0=C2=A0 newer than co= mpiled /home/tohoyn/.cache/guile/ccache/2.0-LE-8-2.0/etc/theme-d-config.scm.go
=
;;; note: auto-compilation is enabled, set GUILE_AUTO_COMPILE=3D0
;;;
=C2=A0=C2=A0=C2=A0=C2=A0= =C2=A0=C2=A0 or pass the -= -no-auto-compile argument to disable.
;;; compiling /etc/theme-d-config.scm
;;; compiled /home/tohoyn/.cache/guile/ccache/2.0-LE-8-2.0/etc/theme-d-conf= ig.scm.go
Unit compiled successfully.
../../translator/theme-d-link.scm -m ..
=C2=A0 -o hello-world.scm hello-w= orld.tcp
Backtrace:
In /usr/local/share/theme-d/translator/theme-d-parametrized-definitions.scm:
=C2=A0693: 19 [do-bind-type-vars1 #(# # #<procedure alloc-loc (s-name)> ...) () ...]
=C2=A0654: 18 [do-bind-type-vars0 #(# # #<procedure alloc-loc (s-name)> ...) () ...]
=C2=A0378: 17 [do-bind-type-vars00 #(# # #<procedure alloc-loc (s-name)> ...) () ...]
In srfi/srfi-1.scm:
=C2=A0576: 16 [map #<procedure 29bef00 at /usr/local/share/theme-d/translator/theme-d-parametrized-definitions.scm:38= 1:42 (subexpr)> ...]
In /usr/local/share/theme-d/translator/theme-d-parametrized-definitions.scm: =C2=A0383: 15 [#<procedure 29bef00 at /usr/local/share/theme-d/translator/theme-d-parametrized-definitions.scm:38= 1:42 (subexpr)> #]
=C2=A0654: 14 [do-bind-type-vars0 #(# # #<procedure alloc-loc (s-name)> ...) () ...]
=C2=A0267: 13 [do-bind-type-vars00 #(# # #<procedure alloc-loc (s-name)> ...) () ...]
3107: 12 [inst-bind-procedure #(# # #<procedure alloc-loc (s-name)> .= ..) () ...]
In /usr/local/share/theme-d/translator/theme-d-expression-cloning.scm:
=C2=A0459: 11 [rebind-local-variables1 # # #]
=C2=A0417: 10 [rebind-local-variables0 # # # ...]
=C2=A0319: 9 [rebind-local-variables00 # # # ...]
In srfi/srfi-1.scm:
=C2=A0576: 8 [map #<procedure 29c5c90 at /usr/local/share/theme-d/translator/theme-d-expression-cloning.scm:321:36 (subexpr)> ...]
In /usr/local/share/theme-d/translator/theme-d-expression-cloning.scm:
=C2=A0417: 7 [rebind-local-variables0 # # # ...]
=C2=A0319: 6 [rebind-local-variables00 # # # ...]
In srfi/srfi-1.scm:
=C2=A0578: 5 [map #<procedure 29c5900 at /usr/local/share/theme-d/translator/theme-d-expression-cloning.scm:321:36 (subexpr)> ...]
In /usr/local/share/theme-d/translator/theme-d-expression-cloning.scm:
=C2=A0417: 4 [rebind-local-variables0 # # # ...]
=C2=A0330: 3 [rebind-local-variables00 # # # ...]
3401: 2 [clone-with-branches # # # ...]
In /usr/local/share/theme-d/translator/theme-d-expression-rebinding.scm:
=C2=A0 10: 1 [rebind-cond-expression # # # ...]
In unknown file:
=C2=A0=C2=A0 = ?: 0 [#<syntax-transformer assert> #t]

ERROR: In procedure #<syntax-transformer assert>:
ERROR: Wrong type to apply: #<syntax-transformer assert>
make: *** [hello-world.scm] Virhe 1
--- cut here ---

The code should compile.

Steps to reproduce the bug:
1. Download
= http://www.iki.fi/tohoyn/theme/th-scheme-utilities-1.1.tar.bz2
and
http://www= .iki.fi/tohoyn/theme/theme-d-0.9.1.tar.bz2
2. Unpack and install the packages according to the instructions in the packages.
3. Go to the subdirectory theme-d/theme-d-code/examples and give command make hello-world.scm

NOTE: Use TH Scheme utilities 1.1 instead of TH Scheme Utilities 1.1x.
Version 1.1x compiles OK.

I have used guile version 2.0.9 in Ubuntu 14.04.

Yours sincerely,

=C2=A0=C2=A0=C2=A0=C2=A0 Tommi H=C3=B6yn=C3=A4l= =C3=A4nmaa


=C2=A0
--001a113ff60c848eda05269f4472-- From debbugs-submit-bounces@debbugs.gnu.org Tue Dec 15 03:19:53 2015 Received: (at 22142) by debbugs.gnu.org; 15 Dec 2015 08:19:53 +0000 Received: from localhost ([127.0.0.1]:52175 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84) (envelope-from ) id 1a8kpt-0002ae-MT for submit@debbugs.gnu.org; Tue, 15 Dec 2015 03:19:53 -0500 Received: from world.peace.net ([50.252.239.5]:53888 ident=hope0) by debbugs.gnu.org with esmtp (Exim 4.84) (envelope-from ) id 1a8kpr-0002aV-VT for 22142@debbugs.gnu.org; Tue, 15 Dec 2015 03:19:52 -0500 Received: from [10.1.10.78] (helo=jojen) by world.peace.net with esmtpsa (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.72) (envelope-from ) id 1a8kpk-0007t7-F9; Tue, 15 Dec 2015 03:19:44 -0500 From: Mark H Weaver To: Tommi =?utf-8?B?SMO2eW7DpGzDpG5tYWE=?= Subject: Re: bug#22142: A bug with define-syntax References: Date: Tue, 15 Dec 2015 03:19:43 -0500 In-Reply-To: ("Tommi \=\?utf-8\?B\?SMO2eW7DpGzDpG5tYWEiJ3M\=\?\= message of "Fri, 11 Dec 2015 15:26:14 +0200") Message-ID: <87mvtcazts.fsf@netris.org> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.5 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-Spam-Score: 0.0 (/) X-Debbugs-Envelope-To: 22142 Cc: 22142@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: 0.0 (/) Tommi H=C3=B6yn=C3=A4l=C3=A4nmaa writes: > I get the following error message: [...] > ERROR: In procedure #: > ERROR: Wrong type to apply: # > make: *** [hello-world.scm] Virhe 1 > --- cut here --- > > The code should compile. This error indicates, roughly speaking, that 'assert' was used before it was defined. More precisely: an expression that uses the 'assert' macro was (macro-)expanded before 'assert' was defined. This works in Guile 1.x, because it's a pure interpreter that performs macro expansion lazily, i.e. it delays expansion of a given expression until the first time the expression is evaluated. This allows you to _define_ a procedure that uses 'assert' before 'assert' is defined, as long as the procedure is not _applied_ (i.e. called) before 'assert' is defined. Guile 2.x uses a new macro expander that is far superior in most respects, but it does not support lazy expansion, and therefore strictly requires that macros be defined before their uses are expanded. Regards, Mark From debbugs-submit-bounces@debbugs.gnu.org Wed Jan 06 16:46:40 2016 Received: (at control) by debbugs.gnu.org; 6 Jan 2016 21:46:40 +0000 Received: from localhost ([127.0.0.1]:40655 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84) (envelope-from ) id 1aGvui-000341-Jx for submit@debbugs.gnu.org; Wed, 06 Jan 2016 16:46:40 -0500 Received: from world.peace.net ([50.252.239.5]:50575 ident=hope9) by debbugs.gnu.org with esmtp (Exim 4.84) (envelope-from ) id 1aGvug-00033q-Kl for control@debbugs.gnu.org; Wed, 06 Jan 2016 16:46:38 -0500 Received: from [10.1.10.78] (helo=jojen) by world.peace.net with esmtpsa (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.72) (envelope-from ) id 1aGvua-0002mO-Nf; Wed, 06 Jan 2016 16:46:32 -0500 From: Mark H Weaver To: control@debbugs.gnu.org Date: Wed, 06 Jan 2016 16:46:30 -0500 Message-ID: <87egduqt3d.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: close 22142 thanks [...] 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: 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: close 22142 thanks [...] 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 close 22142 thanks From unknown Sun Jun 15 13:00:20 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, 04 Feb 2016 12:24:03 +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