From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Sam Lee via "Bug reports for GUILE, GNU's Ubiquitous Extension Language" Newsgroups: gmane.lisp.guile.bugs Subject: bug#52218: Unable to define more than one R7RS library per file Date: Wed, 1 Dec 2021 07:45:53 +0000 Message-ID: <20211201074553.bzuoffwpaxw3da44@localhost> References: <20211201074553.bzuoffwpaxw3da44.ref@localhost> Reply-To: Sam Lee Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="17761"; mail-complaints-to="usenet@ciao.gmane.io" To: 52218@debbugs.gnu.org Original-X-From: bug-guile-bounces+guile-bugs=m.gmane-mx.org@gnu.org Wed Dec 01 09:56:17 2021 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 1msLPU-0004Ug-VE for guile-bugs@m.gmane-mx.org; Wed, 01 Dec 2021 09:56:17 +0100 Original-Received: from localhost ([::1]:34688 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1msLPT-00074m-5z for guile-bugs@m.gmane-mx.org; Wed, 01 Dec 2021 03:56:15 -0500 Original-Received: from eggs.gnu.org ([209.51.188.92]:53800) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1msLPG-000739-EK for bug-guile@gnu.org; Wed, 01 Dec 2021 03:56:03 -0500 Original-Received: from debbugs.gnu.org ([209.51.188.43]:59885) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1msLPG-0004vy-6q for bug-guile@gnu.org; Wed, 01 Dec 2021 03:56:02 -0500 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1msLPF-0000Gz-Rt for bug-guile@gnu.org; Wed, 01 Dec 2021 03:56:01 -0500 X-Loop: help-debbugs@gnu.org Resent-From: Sam Lee Original-Sender: "Debbugs-submit" Resent-CC: bug-guile@gnu.org Resent-Date: Wed, 01 Dec 2021 08:56:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: report 52218 X-GNU-PR-Package: guile X-Debbugs-Original-To: bug-guile@gnu.org Original-Received: via spool by submit@debbugs.gnu.org id=B.16383489421022 (code B ref -1); Wed, 01 Dec 2021 08:56:01 +0000 Original-Received: (at submit) by debbugs.gnu.org; 1 Dec 2021 08:55:42 +0000 Original-Received: from localhost ([127.0.0.1]:43198 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1msLOv-0000GP-Ti for submit@debbugs.gnu.org; Wed, 01 Dec 2021 03:55:42 -0500 Original-Received: from lists.gnu.org ([209.51.188.17]:44068) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1msKJh-000709-Ca for submit@debbugs.gnu.org; Wed, 01 Dec 2021 02:46:13 -0500 Original-Received: from eggs.gnu.org ([209.51.188.92]:38892) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1msKJe-0000ky-RH for bug-guile@gnu.org; Wed, 01 Dec 2021 02:46:13 -0500 Original-Received: from sonic303-1.consmr.mail.bf2.yahoo.com ([74.6.131.40]:33375) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1msKJW-0003wf-9A for bug-guile@gnu.org; Wed, 01 Dec 2021 02:46:05 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=yahoo.com; s=s2048; t=1638344760; bh=O4MIiFflisP04hdtZOeiTGzNTKRriT4NfZoA0zc18zI=; h=Date:From:To:Subject:References:From:Subject:Reply-To; b=OmENhbO+60Y/savbd43qFaLgXFFgqUhJLMHqiB9bhnfToDH0zut88l7HH7/+m2R6aHd2ZCtewCV6tJDgNv0hMEh5US8lAyXSFxUSPvjqyWvmzXE0UL96I9OFJm1PCSTwBUGlUf3X0wuotzXwvZGQ/DMqhJPDv9COUrAFRdvdbP9pNOteWU/d7dfAYC0vZ7UlRZiBRXexGFL7CM3zhnSvql7NEBDoXwH7C37xiQoOKbSJYm5oz94dsUkZXE8mwemDNeuagCTNpnwkfJv613sx/Vp9zIwMxncWS8jDFal1uWnlaFiKg6l9icFYymGr6Ix6TMeBvpsxKeOcMXGFg5Dnwg== X-SONIC-DKIM-SIGN: v=1; a=rsa-sha256; c=relaxed/relaxed; d=yahoo.com; s=s2048; t=1638344760; bh=y/+6h4Gbx7m19TfHpol/Y+Ny9L5vmQUhrrn+XTnOeNt=; h=X-Sonic-MF:Date:From:To:Subject:From:Subject; b=To/qmCgZr89h+Wn1L9k1fu1KKM17H1VkzWVU0xZMmivq8AW4v0Pqeg43HHSTvm3sHWZSQb10/TP4vojmjWPghvFqg3/GNo8e0Yc+ofxy5k1IVxkCORdHPmxJ0/eehQGvfpiMQ2ToxL4iY1HzJ9RW38r5th3Q6sayBRG9mrtaqI1eIuXZl++EoQ1AtOHg/jC8GsVT38fya3v2pcWWgyvlSmlcMERPAy4RqfnJuDD0ODKB3h3tL/DkOQ8O8qeG9eKOZlp/X1pOM4sy6Xkxd5bX8BrDz25w8ijBU6oRNN5QiGig3JpLBfLrcUmTp1ubMd4hvEehXnKpnC6qJbowPMRdYw== X-YMail-OSG: y_wey14VM1lQeTCFRG6u_85OHq5MQrTTNmIe5fzbXT7UeyKM.0oj1fcBythC4cH 8yEgmWizVvp0209HKOWBH03I6sigxSkJSd2HURYS9QOakItr4ujrhQDnO440jx4gLuKDJs1PL03R 6mrZnNS8AxN7RFexQgZtHWmJQcgD8vo7Ay.RoLWoG3zW823ZYnc3Tr2eTs2l9sG3jvnwkcO8VELs wxvyO9FrO.OlWclPxDj02h46NLrpivV6vnW9Vl4PUDbiogMGVyAhFFigbpp_zSbZNgAE5_AVzSdB VAbJSS.m2KM4EL9PUko38aJG.pZemkf.tHKdssLRgHgVkGrwd56ZpuMAAbgPpwguoPlGH5Q481kb BD4LSeJPscGudC51infuKeU6iRbAF7vK.OF0z_zkVLxSZXg2QeJDMiS6RLY3njBbSOSp.KpcozGC VmLacYubq4puJUA0iciKr4ZDYwpiZeOKLDQOPejlOuWhETNe9RE_YshLIsMLoxFsa7a3P3f3McKE n9C_0FBL03RrlMCu7aorqJ1d0FEoKTMY16u3B6Uw1mlwKUShbB_twYj7_UBLRT.8VGrks3WA3mnl alhUASh0q32sBBxlGoyL7fa465PodH9HfhZ3TJpOtzUKQyWuQXEe0GmRkKfAbTc.BSu344A3Nn.C iVthnfgSX6324bE0NK_zD5eRWjsIa9IYVJiJqdWBKduuh5uvuj0bUFWQvxJUYQeJGYthqA.Lo1sj goOCcO5z7JV5Im9taICmpdStlSX5ZcVXKOehKbzmIehr0OYQQonRk8PYb.pPSQgKGmEOqygAuPIP 9EPNpyE1yIFVVONQuywpebs28XgH1H97bxDq7KKlg3 X-Sonic-MF: Original-Received: from sonic.gate.mail.ne1.yahoo.com by sonic303.consmr.mail.bf2.yahoo.com with HTTP; Wed, 1 Dec 2021 07:46:00 +0000 Original-Received: by kubenode509.mail-prod1.omega.sg3.yahoo.com (VZM Hermes SMTP Server) with ESMTPA ID a33c6d8c64ab57ae21d9901cfc6b8edd; Wed, 01 Dec 2021 07:45:57 +0000 (UTC) Mail-Followup-To: bug-guile@gnu.org Content-Disposition: inline X-Mailer: WebService/1.1.19306 mail.backend.jedi.jws.acl:role.jedi.acl.token.atz.jws.hermes.yahoo Received-SPF: pass client-ip=74.6.131.40; envelope-from=samlee746@yahoo.com; helo=sonic303-1.consmr.mail.bf2.yahoo.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, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, FREEMAIL_ENVFROM_END_DIGIT=0.25, FREEMAIL_FROM=0.001, RCVD_IN_DNSWL_NONE=-0.0001, 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-Mailman-Approved-At: Wed, 01 Dec 2021 03:55:40 -0500 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" Xref: news.gmane.io gmane.lisp.guile.bugs:10214 Archived-At: Guile is unable to handle more than one define-library per file. For example, this is "mylibs.sld", which contains two define-library: (define-library (example mylib) (import (scheme base)) (export f) (begin (define (f x) (+ x 1)))) (define-library (example main) (import (scheme base) (scheme write) (example mylib)) (export main) (begin (define (main) (display "The answer is: ") (display (f 1)) (newline)))) When loading this file into Guile using "guile -l mylibs.sld", or by using (load "mylibs.sld"), Guile will show this error: ;;; note: auto-compilation is enabled, set GUILE_AUTO_COMPILE=0 ;;; or pass the --no-auto-compile argument to disable. ;;; compiling /home/user/mylibs.sld ;;; WARNING: compilation of /home/user/mylibs.sld failed: ;;; Syntax error: ;;; unknown location: definition in expression context, where definitions are not allowed, in form (define (main) (display "The answer is: ") (display (f 1)) (newline)) ice-9/psyntax.scm:2794:12: In procedure syntax-violation: Syntax error: /home/user/mylibs.sld:14:4: definition in expression context, where definitions are not allowed, in form (define (main) (display "The answer is: ") (display (f 1)) (newline)) The error is always caused by the second define-library. Apparently, Guile no longer understands that define-library is a special form by the time the second define-library is evaluated. Is it not possible to define two R7RS libraries in the same file? Guile version: 3.0.7