From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: lloda Newsgroups: gmane.lisp.guile.user Subject: Re: cond clause does not allow definitions Date: Wed, 22 May 2024 22:37:01 +0200 Message-ID: <489A2170-F3A4-4DB8-A52A-249C3178A516@sarc.name> References: <5d1be852da93dd324fdbcaa24ed1b444@aleph0.info> Mime-Version: 1.0 (Mac OS X Mail 13.4 \(3608.120.23.2.7\)) Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="30086"; mail-complaints-to="usenet@ciao.gmane.io" Cc: Jeronimo Pellegrini , guile-user To: Damien Mattei Original-X-From: guile-user-bounces+guile-user=m.gmane-mx.org@gnu.org Wed May 22 22:37:39 2024 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 1s9siR-0007bg-QE for guile-user@m.gmane-mx.org; Wed, 22 May 2024 22:37:39 +0200 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1s9si5-0004aw-3S; Wed, 22 May 2024 16:37:17 -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 1s9si3-0004an-R0 for guile-user@gnu.org; Wed, 22 May 2024 16:37:15 -0400 Original-Received: from mta-06-4.privateemail.com ([198.54.122.146]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1s9si0-0002ie-QZ for guile-user@gnu.org; Wed, 22 May 2024 16:37:15 -0400 Original-Received: from mta-06.privateemail.com (localhost [127.0.0.1]) by mta-06.privateemail.com (Postfix) with ESMTP id 5D1A918000A9; Wed, 22 May 2024 16:37:07 -0400 (EDT) Original-Received: from [192.168.1.9] (unknown [51.154.167.214]) by mta-06.privateemail.com (Postfix) with ESMTPA; Wed, 22 May 2024 16:37:03 -0400 (EDT) In-Reply-To: X-Mailer: Apple Mail (2.3608.120.23.2.7) X-Virus-Scanned: ClamAV using ClamSMTP Received-SPF: pass client-ip=198.54.122.146; envelope-from=lloda@sarc.name; helo=MTA-06-4.privateemail.com 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_DNSWL_NONE=-0.0001, RCVD_IN_MSPIKE_H4=0.001, RCVD_IN_MSPIKE_WL=0.001, SPF_HELO_PASS=-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:19677 Archived-At: This is probably = http://git.savannah.gnu.org/gitweb/?p=3Dguile.git;a=3Dcommitdiff;h=3D764e3= 614b8c13de604399572a67d071621e9ca21 = and the next commit that documents = the change. It was after 3.0.9. > On 22 May 2024, at 22:33, Damien Mattei = wrote: >=20 > Bonjour, >=20 > so it is with the version i currently use which is older than you: > (base) mattei@mbp-touch-bar library-FunctProg % guile > GNU Guile 3.0.8.99-f3ea8 > Copyright (C) 1995-2022 Free Software Foundation, Inc. >=20 > Guile comes with ABSOLUTELY NO WARRANTY; for details type `,show w'. > This program is free software, and you are welcome to redistribute it > under certain conditions; type `,show c' for details. >=20 > Enter `,help' for help. > scheme@(guile-user)> (cond (#t (define x 7) x)) > While compiling expression: > Syntax error: > unknown file:1:10: definition in expression context, where definitions = are > not allowed, in form (define x 7) >=20 > thanks >=20 > On Wed, May 22, 2024 at 10:07=E2=80=AFPM Jeronimo Pellegrini = > wrote: >=20 >> Hello! >>=20 >> On 2024-05-22 16:26, Damien Mattei wrote: >>> scheme@(guile-user)> (cond (#t (define x 7) x)) >>> While compiling expression: >>> Syntax error: >>> unknown file:7:10: definition in expression context, where = definitions >>> are >>> not allowed, in form (define x 7) >>=20 >> I get no error here (Guile 3.0.9.164-e1690, compiled locally): >>=20 >> scheme@(guile-user)> (cond (else (define x 7) x)) >> $1 =3D 7 >> scheme@(guile-user)> (cond (#t (define x 7) x)) >> $2 =3D 7 >>=20 >> A: (cond (#t (define x 7) x)) >> B: (cond (else (define x 7) x)) >>=20 >> | system | A | B | >> |-------------|-------|-------| >> | Bigloo | 7 | 7 | >> | Biwa | 7 | 7 | >> | Chez | error | 7 | >> | Chibi | error | 7 | >> | Chicken | 7 | 7 | >> | Cyclone | 7 | 7 | >> | Gambit | error | error | >> | Gauche | 7 | 7 | >> | Guile | 7 | 7 | >> | Kawa | 7 | 7 | >> | LIPS | 7 | error | >> | Loko | error | error | >> | MIT | error | 7 | >> | Racket | 7 | 7 | >> | Sagittarius | 7 | 7 | >> | Scheme48 | error | 7 | >> | Scheme 9 | error | 7 | >> | SCM | 7 | 7 | >> | STklos | 7 | 7 | >> | Tinyscheme | 7 | 7 | >>=20 >> * LIPS does not recognise the 'else' clause. >>=20 >> J. >>=20