From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Maxim Cournoyer Newsgroups: gmane.lisp.guile.bugs Subject: bug#67255: define-library does not support 'rename' directives Date: Sat, 18 Nov 2023 00:46:01 -0500 Message-ID: <87r0knbome.fsf@gmail.com> Mime-Version: 1.0 Content-Type: text/plain Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="20188"; mail-complaints-to="usenet@ciao.gmane.io" To: 67255@debbugs.gnu.org Original-X-From: bug-guile-bounces+guile-bugs=m.gmane-mx.org@gnu.org Sat Nov 18 06:47:19 2023 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 1r4EAo-000546-Nu for guile-bugs@m.gmane-mx.org; Sat, 18 Nov 2023 06:47:18 +0100 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1r4EAZ-00075h-84; Sat, 18 Nov 2023 00:47:03 -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 1r4EAX-000752-H1 for bug-guile@gnu.org; Sat, 18 Nov 2023 00:47:01 -0500 Original-Received: from debbugs.gnu.org ([2001:470:142:5::43]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1r4EAX-0007U3-8F for bug-guile@gnu.org; Sat, 18 Nov 2023 00:47:01 -0500 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1r4EAX-0001l3-RC for bug-guile@gnu.org; Sat, 18 Nov 2023 00:47:01 -0500 X-Loop: help-debbugs@gnu.org Resent-From: Maxim Cournoyer Original-Sender: "Debbugs-submit" Resent-CC: bug-guile@gnu.org Resent-Date: Sat, 18 Nov 2023 05:47:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: report 67255 X-GNU-PR-Package: guile X-Debbugs-Original-To: bug-guile Original-Received: via spool by submit@debbugs.gnu.org id=B.17002863766701 (code B ref -1); Sat, 18 Nov 2023 05:47:01 +0000 Original-Received: (at submit) by debbugs.gnu.org; 18 Nov 2023 05:46:16 +0000 Original-Received: from localhost ([127.0.0.1]:47453 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1r4E9n-0001k0-GM for submit@debbugs.gnu.org; Sat, 18 Nov 2023 00:46:15 -0500 Original-Received: from lists.gnu.org ([2001:470:142::17]:52298) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1r4E9k-0001jl-Uu for submit@debbugs.gnu.org; Sat, 18 Nov 2023 00:46:14 -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 1r4E9d-0006qk-NM for bug-guile@gnu.org; Sat, 18 Nov 2023 00:46:05 -0500 Original-Received: from mail-qt1-x82f.google.com ([2607:f8b0:4864:20::82f]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1r4E9c-0007GC-6L for bug-guile@gnu.org; Sat, 18 Nov 2023 00:46:05 -0500 Original-Received: by mail-qt1-x82f.google.com with SMTP id d75a77b69052e-41eb4210383so15503931cf.0 for ; Fri, 17 Nov 2023 21:46:03 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1700286363; x=1700891163; darn=gnu.org; h=mime-version:message-id:date:subject:to:from:from:to:cc:subject :date:message-id:reply-to; bh=YuQDvq4Ek3lIgR0chsKmheebqN8Rgky+T3LUOSHPDoU=; b=d+Qa+6cwXYr9ZePdOd87E7uAdf9+nHfVinpfyl3C4Tt0GfOSY/HT+jhAPZ9N1AKola d3Jd1icbPrCzE+Y8IcEtqqr7VGcukfYLkjKBNM6tMX3WmP3lGpECzS0ZOzy/DjKEMH8x B0liHECeLiWz9kUFhvi0lWeEZdmepTK6dKGLrm+37Idz5YSCvGBjFF5Wa4WfQi1EpbeX kkTlewVCMqpcODewSxa7KH6xJ8VouyynvwaUEAPPeldaVE+hx03ePQ4rJ/oPQLxyPAQf WTV+4FxcP1TtPjAYinlpv/kHm4LMgX/L6NHi6clAexkrEzPJku0Z/Stcwmb/P0RzikLd Yt5Q== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1700286363; x=1700891163; h=mime-version:message-id:date:subject:to:from:x-gm-message-state :from:to:cc:subject:date:message-id:reply-to; bh=YuQDvq4Ek3lIgR0chsKmheebqN8Rgky+T3LUOSHPDoU=; b=PXh+9EObqZO1gHZLZuxfrjP+I45WUB4yNuqUYBj7rfJMUytxe1OcmJThLON5DeFNE7 ndVTQbC4bDoWRmI3fJ9EIPMMt9PQsFksIGuljOk3WFEDhTMa2jbOsg4/EMG0LBE5EGn6 4ivgZLLVgm1uLuos1kko2OIMTToEGPavq+1TbYZk0pzkZcH/iVUROAr82eNBKlKuKMmd aBUUFvJs1koXsrJmbOkirE4kUR92zyJabqcCTgoMgs9RF9qAiE+z3juRVzK9CpSQkVF5 rO/gRiDkk7C3n3SSYT/Ti8DBlw12y71EUwfM9+jd87QTkDfbq0f7NO35h7h/ZPXfjGWU fr5A== X-Gm-Message-State: AOJu0YzRJOQg5k2CVmowUpBzwXzixJVxJoWXkH31PdjWe+vvv79C7eWd Cu2Pr8PIO15qujlhHLoV7kC/TxT3Kyo= X-Google-Smtp-Source: AGHT+IFpTziLBdgGHvy2/dt4SknOP63JGLPUIZ6xhyn17xuqEE6CcB7nYV/VjNOWALaUDBPDPwOGHg== X-Received: by 2002:a05:620a:2606:b0:773:cb13:cb7d with SMTP id z6-20020a05620a260600b00773cb13cb7dmr1953645qko.48.1700286362684; Fri, 17 Nov 2023 21:46:02 -0800 (PST) Original-Received: from hurd (dsl-154-55.b2b2c.ca. [66.158.154.55]) by smtp.gmail.com with ESMTPSA id g4-20020a05620a278400b0076f16e98851sm1124408qkp.102.2023.11.17.21.46.01 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 17 Nov 2023 21:46:02 -0800 (PST) Received-SPF: pass client-ip=2607:f8b0:4864:20::82f; envelope-from=maxim.cournoyer@gmail.com; helo=mail-qt1-x82f.google.com X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 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_FROM=0.001, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001, T_SCC_BODY_TEXT_LINE=-0.01 autolearn=ham autolearn_force=no X-Spam_action: no action 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:10701 Archived-At: Hi, Our R7RS define-library syntax, from (ice-9 r7rs-library) does not support renaming bindings to export, via 'rename' directives. For example, attempting to build srfi/125.sld, which reads: --8<---------------cut here---------------start------------->8--- (define-library (srfi srfi-125) (export make-hash-table hash-table hash-table-unfold alist->hash-table hash-table? hash-table-contains? hash-table-empty? hash-table=? hash-table-mutable? hash-table-ref hash-table-ref/default hash-table-set! hash-table-delete! hash-table-intern! hash-table-update! hash-table-update!/default hash-table-pop! hash-table-clear! hash-table-size hash-table-keys hash-table-values hash-table-entries hash-table-find hash-table-count hash-table-map hash-table-for-each hash-table-map! hash-table-map->list hash-table-fold hash-table-prune! hash-table-copy hash-table-empty-copy hash-table->alist hash-table-union! hash-table-intersection! hash-table-difference! hash-table-xor! ;; The following procedures are deprecated by SRFI 125: (rename deprecated:hash hash) (rename deprecated:string-hash string-hash) (rename deprecated:string-ci-hash string-ci-hash) (rename deprecated:hash-by-identity hash-by-identity) (rename deprecated:hash-table-equivalence-function hash-table-equivalence-function) (rename deprecated:hash-table-hash-function hash-table-hash-function) (rename deprecated:hash-table-exists? hash-table-exists?) (rename deprecated:hash-table-walk hash-table-walk) (rename deprecated:hash-table-merge! hash-table-merge!) ) (import (scheme base) (scheme write) ; for warnings about deprecated features (srfi 126) (except (srfi 128) hash-salt ; exported by (srfi 126) string-hash ; exported by (srfi 126) string-ci-hash ; exported by (srfi 126) symbol-hash ; exported by (srfi 126) )) (cond-expand ((library (scheme char)) (import (scheme char))) (else (begin (define string-ci=? string=?)))) (include "srfi-125/125.body.scm") ) --8<---------------cut here---------------end--------------->8--- Fails with: --8<---------------cut here---------------start------------->8--- $ ./meta/guild compile -W3 ./module/srfi/srfi-125.scm /module/srfi/srfi-128.scm.go ice-9/boot-9.scm:1682:22: In procedure raise-exception: Syntax error: unknown location: source expression failed to match any pattern in form ((rename deprecated:hash hash) (rename deprecated:string-hash string-hash) (rename deprecated:string-ci-hash string-ci-hash) (rename deprecated:hash-by-identity hash-by-identity) (rename deprecated:hash-table-equivalence-function hash-table-equivalence-function) (rename deprecated:hash-table-hash-function hash-table-hash-function) (rename deprecated:hash-table-exists? hash-table-exists?) (rename deprecated:hash-table-walk hash-table-walk) (rename deprecated:hash-table-merge! hash-table-merge!)) --8<---------------cut here---------------end--------------->8--- Our define-module syntax does not have such a feature (of renaming *exported* bindings), so this would seem to require new development on that side first. -- Thanks, Maxim