From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Jean Abou Samra Newsgroups: gmane.lisp.guile.user Subject: Re: error Wrong type to apply: # References: <36b686bbcedd978b99002f04709152660c2b3f7c.camel@abou-samra.fr> <9b47720a-eefb-5bd5-91b7-d7f4eb124986@telenet.be> Mime-Version: 1.0 Content-Type: multipart/signed; micalg="pgp-sha512"; protocol="application/pgp-signature"; boundary="=-NV953WQrrg6wchPk0at6" Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="19574"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Evolution 3.48.4 (3.48.4-1.fc38) To: Maxime Devos , Damien Mattei , guile-user Original-X-From: guile-user-bounces+guile-user=m.gmane-mx.org@gnu.org Wed Aug 09 15:23:37 2023 Return-path: Envelope-to: guile-user@m.gmane-mx.org Original-Received: from lists.gnu.org ([209.51.188.17]) by ciao.gmane.io with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1qTjA1-0004yi-Ar for guile-user@m.gmane-mx.org; Wed, 09 Aug 2023 15:23:37 +0200 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1qTj9M-0004dl-69; Wed, 09 Aug 2023 09:22:56 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1qTj9J-0004cm-Ds for guile-user@gnu.org; Wed, 09 Aug 2023 09:22:53 -0400 Original-Received: from mout.kundenserver.de ([212.227.126.130]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1qTj9E-0007FX-Gc for guile-user@gnu.org; Wed, 09 Aug 2023 09:22:51 -0400 Original-Received: from [10.102.140.73] ([193.190.193.2]) by mrelayeu.kundenserver.de (mreue011 [212.227.15.168]) with ESMTPSA (Nemesis) id 1M8Qme-1qPJIq3kh6-004TRW; Wed, 09 Aug 2023 15:22:44 +0200 In-Reply-To: <9b47720a-eefb-5bd5-91b7-d7f4eb124986@telenet.be> X-Provags-ID: V03:K1:aivO4NyeltTEJRYmieyl/iNx/KjUu3aaVxGhs7W3PYVeN6asRP+ UrpRIA4RRmICYwprN8Yr4st7oKKjwWPQcK60CzdLdYzhB5PTz4jpwny3EFmoT5XVD+FSs0w 6lZzBPrxNiy24/NCLyO1iQqqlIhzzYpaTYNhcjw0aX6+hSuf8+SOPbMsugNdtSqo0jRCRrc cqf7gxWYWRN3kqQbi4+Bw== UI-OutboundReport: notjunk:1;M01:P0:6p0I2025RIY=;duQ+g9wxpTANvRiAUtZy1oIcfIv NsPVN8PK3OxbnJs+0g8Op2jI4aGlqvf00yDelAN6GhzimZlovFNGWGh2NS1jNCOCjb0B9IYLZ a1LVqzgfEVnqXwFKzUVSj7yEQKwtwZ7g++Ey7fDpcmZNhiLOKw8ZNLnzUo1uf5VN5oQEOXLEN F0NT5il7sxkI7a9Y7Nu27I6NIYbxyG12ucbgOVABClqeP/ZVmyHKmTaCzruC2qM28je1WXfAm 04BncZkUxl8sr6tItoqRUY88lgFPOOK1mcb4NHgy/CGbj0Q+Ea9kQOX+yH6NoXRa0VuBN924U Yz7zB4hEDTg64IwjrBE67Ul96g8u1g5DSWRMtqeMPyvJObRpF1ixB8FKUSl76oHANgy8WGQbm LwSN69MiN142E24DslJ2wduVyuO+w1+Ij8WWJS3DkJOpjbxYoVrsZCnrCFPFce5UW2wNZqhu7 aDHRbUI0I7DZixt/vm0ovjqTxnOfybvjwbTe3Hw35vOlsqWSeOC6lLuvGhhDGGnA3BaWVaPZz JyElU356KZwwpYeEIcYTDugoj8/KSbU3bJfdZA5MRTSdD8zWigkjEWvPHCfcFgF9p/SWy/y9k jWF4z29sIbzt3LXuceypNfbZKMwDvybAdmyHH9G7sIZxcucufb1IgXPcDqXlcVL2YkXdQAbfX PFlljrcf0moc7exhvmkRgqM7zcvnXER72wr+7sVH1kBn/ZIchtXxb7x+gqR/vyGzH+jpQQhir TiZigK07CnpMkkI4ojJK04wn1UMn6a4tgOSTsACAHnSDFKD45nzU8DibWjS/JPBkZHqs5W7m Received-SPF: pass client-ip=212.227.126.130; envelope-from=jean@abou-samra.fr; helo=mout.kundenserver.de X-Spam_score_int: -18 X-Spam_score: -1.9 X-Spam_bar: - X-Spam_report: (-1.9 / 5.0 requ) BAYES_00=-1.9, HTML_MESSAGE=0.001, RCVD_IN_MSPIKE_H2=-0.001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-Content-Filtered-By: Mailman/MimeDel 2.1.29 X-BeenThere: guile-user@gnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: General Guile related discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: guile-user-bounces+guile-user=m.gmane-mx.org@gnu.org Original-Sender: guile-user-bounces+guile-user=m.gmane-mx.org@gnu.org Xref: news.gmane.io gmane.lisp.guile.user:19136 Archived-At: --=-NV953WQrrg6wchPk0at6 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable Le mercredi 09 ao=C3=BBt 2023 =C3=A0 11:42 +0200, Maxime Devos a =C3=A9crit= =C2=A0: >=20 >=20 > Op 09-08-2023 om 01:00 schreef Jean Abou Samra: > > Le mardi 08 ao=C3=BBt 2023 =C3=A0 21:38 +0200, Maxime Devos a =C3=A9cri= t=C2=A0: > > > As such, this not working on the top-level seems a bug to me -- after > > > all, a module definition is conceptually just a big let: > > >=20 > > > (if applicable) > > > (let () > > > =C2=A0=C2=A0=C2=A0 > > > =C2=A0=C2=A0=C2=A0 (define ...) > > > =C2=A0=C2=A0=C2=A0 (define-syntax-rule ...) ... > > > =C2=A0=C2=A0=C2=A0 ;; use a new macro using syntax-local-binding > > > =C2=A0=C2=A0=C2=A0 ;; to extract the syntax transformer (*). > > > =C2=A0=C2=A0=C2=A0 ) > > >=20 > > > (*) not sure if that precise approach actually works in this context > >=20 > >=20 > >=20 > > This is very tempting to believe, and I wish it were true, but it's not > > true. > >=20 > > At least in Guile, the part doesn't happe= n > > at the end of evaluating the module. Each module variable is created an= d > > inserted while evaluating the define form. Otherwise this would give > > an error: > >=20 > > (define a 5) > > (define b (module-ref (current-module) 'a)) > > (display b) >=20 > I don't see a problem here, only a little backwards-incompatibility (I= =20 > mean, you could just ... not do that, and do (define b a) instead). I didn't say that it couldn't be improved, only that it didn't work like yo= u described in current Guile. --=-NV953WQrrg6wchPk0at6 Content-Type: application/pgp-signature; name="signature.asc" Content-Description: This is a digitally signed message part -----BEGIN PGP SIGNATURE----- iHUEABYKAB0WIQSZ7TKxnKGyBvBjzBmj8PYLiTOX/gUCZNOTIwAKCRCj8PYLiTOX /rFiAP9mPsvJ26bhyIcm4Yy0ObjiKeA00UmbCssNwollkHRGkgD/T57UUDjS7fm/ oBrhwjcH8FY0ssrVh5SmGpNiaI2f5wg= =OjPZ -----END PGP SIGNATURE----- --=-NV953WQrrg6wchPk0at6--