From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: jbranso--- via "Bug reports for GUILE, GNU's Ubiquitous Extension Language" Newsgroups: gmane.lisp.guile.bugs Subject: bug#59221: (file-exists? #f) raises an exception Date: Sun, 13 Nov 2022 02:15:43 +0000 Message-ID: <8627ff0decc84502a4325fd64a425feb@dismail.de> References: <1D1C3D58-0BC7-40C2-AC1A-38E59C53FE00@abou-samra.fr> <87y1sghxm2.fsf@dismail.de> Reply-To: jbranso@dismail.de Mime-Version: 1.0 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="2996"; mail-complaints-to="usenet@ciao.gmane.io" Cc: 59221@debbugs.gnu.org To: "Jean Abou Samra" Original-X-From: bug-guile-bounces+guile-bugs=m.gmane-mx.org@gnu.org Sun Nov 13 03:16:51 2022 Return-path: Envelope-to: guile-bugs@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 1ou2YF-0000YH-0a for guile-bugs@m.gmane-mx.org; Sun, 13 Nov 2022 03:16:51 +0100 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1ou2XU-0007oL-OM; Sat, 12 Nov 2022 21:16:04 -0500 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 1ou2XS-0007no-Fa for bug-guile@gnu.org; Sat, 12 Nov 2022 21:16:02 -0500 Original-Received: from debbugs.gnu.org ([209.51.188.43]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1ou2XS-0003ha-5U for bug-guile@gnu.org; Sat, 12 Nov 2022 21:16:02 -0500 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1ou2XR-0005MS-M3 for bug-guile@gnu.org; Sat, 12 Nov 2022 21:16:01 -0500 X-Loop: help-debbugs@gnu.org Resent-From: jbranso@dismail.de Original-Sender: "Debbugs-submit" Resent-CC: bug-guile@gnu.org Resent-Date: Sun, 13 Nov 2022 02:16:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 59221 X-GNU-PR-Package: guile Original-Received: via spool by 59221-submit@debbugs.gnu.org id=B59221.166830575520587 (code B ref 59221); Sun, 13 Nov 2022 02:16:01 +0000 Original-Received: (at 59221) by debbugs.gnu.org; 13 Nov 2022 02:15:55 +0000 Original-Received: from localhost ([127.0.0.1]:49656 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1ou2XL-0005Lz-3c for submit@debbugs.gnu.org; Sat, 12 Nov 2022 21:15:55 -0500 Original-Received: from mx2.dismail.de ([159.69.191.136]:26703) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1ou2XI-0005Lg-GT for 59221@debbugs.gnu.org; Sat, 12 Nov 2022 21:15:53 -0500 Original-Received: from mx2.dismail.de (localhost [127.0.0.1]) by mx2.dismail.de (OpenSMTPD) with ESMTP id f273dcf4; Sun, 13 Nov 2022 03:15:45 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed; d=dismail.de; h= mime-version:date:content-type:content-transfer-encoding:from :message-id:subject:to:cc:in-reply-to:references; s=20190914; bh=UQuUypKNsT3QTmI6iu3iOFuUJgC4eOZy6p5anmWln/E=; b=iBnQzkWCv5Yr 1kk0gWWROOLH+qlmgirYf0njqvGywgr5MgkFJui2AvsGMzUmo7d+VscGCNCks50H wCWaRlrQeSZdraQ4AdQONebk64pAiz25VzPAyl/bWdfJQP6D2ifzAtPesy8k506M g+APnfHpV+WULRBZMl2XiT+vOQUWmHdppYRcdAcwJQGv2P0yIGm9OUfkH7PIaTQB d1lWzMLW1TOuTxJ404vFd7pLPyJ7WfQgfpFcgozYqPS+qij2E+ytxiXTKDApc8KX BocyQAqvfWK7/E+uaQBK36C+mSbPhq2YebtG0SkyqmYgntGA/b+CcyGXjGzs47l/ Ke8wkMO7Fg== Original-Received: from smtp2.dismail.de ( [10.240.26.12]) by mx2.dismail.de (OpenSMTPD) with ESMTP id c076c892; Sun, 13 Nov 2022 03:15:44 +0100 (CET) Original-Received: from smtp2.dismail.de (localhost [127.0.0.1]) by smtp2.dismail.de (OpenSMTPD) with ESMTP id 72396182; Sun, 13 Nov 2022 03:15:44 +0100 (CET) Original-Received: by dismail.de (OpenSMTPD) with ESMTPSA id d183c269 (TLSv1.3:TLS_AES_256_GCM_SHA384:256:NO); Sun, 13 Nov 2022 03:15:43 +0100 (CET) X-Mailer: RainLoop/1.16.0a In-Reply-To: <1D1C3D58-0BC7-40C2-AC1A-38E59C53FE00@abou-samra.fr> X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-BeenThere: bug-guile@gnu.org List-Id: "Bug reports for GUILE, GNU's Ubiquitous Extension Language" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-guile-bounces+guile-bugs=m.gmane-mx.org@gnu.org Original-Sender: bug-guile-bounces+guile-bugs=m.gmane-mx.org@gnu.org Xref: news.gmane.io gmane.lisp.guile.bugs:10429 Archived-At: November 12, 2022 12:58 PM, "Jean Abou Samra" wrote: >> Le 12 nov. 2022 =C3=A0 18:50, Joshua Branson via Bug reports for GUILE= , GNU's Ubiquitous Extension >> Language a =C3=A9crit : >>=20 >>=20Hello you lovely guile people! >>=20 >>=20This bug is so simple the subject line says it all! >>=20 >>=20file-exists? is a predicate, but >>=20 >>=20#+BEGIN_SRC scheme >> (file-exists? #f) >> ice-9/boot-9.scm:1685:16: In procedure raise-exception: >> In procedure stat: Wrong type argument in position 1 (expecting open f= ile port): #f >>=20 >>=20Entering a new prompt. Type `,bt' for a backtrace or `,q' to continu= e. >> #+END_SRC >>=20 >>=20I will shortly tag this as "easy". Can you lovely maintainers give m= e >> about a week to try to fix this myself? >>=20 >>=20Thanks, >>=20 >>=20Joshua >> avid fantany reader >=20 >=20What=E2=80=99s the problem here? >=20 >=20It is normal for predicates to be defined only on certain types. You = will find the same with > positive?, string-null? and the like. Perhaps I am just being really pedantic. I asked in the #guile irc chat = if a predicate should=20 be=20able to raise an exception. The answer I was given was no. Admittedly I did not stay in the channel for long, and I quickly filed th= is bug report. Naively, it just feel like it (file-exists? #f) should return #f. Would there be an objection to changing the definition of file-exists to= =20=20 (define=20(file-exists file) (and (string? file) (old-file-exists-code file))) Thanks, Joshua >=20 >=20Regards, > Jean