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.devel Subject: [PATCH v6 00/16] Add SRFI 209 and dependencies; improve support for R7RS libraries Date: Sat, 2 Dec 2023 20:37:01 -0500 Message-ID: <20231203014115.26985-1-maxim.cournoyer@gmail.com> Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="29575"; mail-complaints-to="usenet@ciao.gmane.io" Cc: Maxim Cournoyer To: guile-devel@gnu.org Original-X-From: guile-devel-bounces+guile-devel=m.gmane-mx.org@gnu.org Sun Dec 03 02:42:40 2023 Return-path: Envelope-to: guile-devel@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 1r9bVH-0007S8-9l for guile-devel@m.gmane-mx.org; Sun, 03 Dec 2023 02:42:39 +0100 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1r9bUC-0001L8-Oa; Sat, 02 Dec 2023 20:41:32 -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 1r9bU9-0001K2-OI for guile-devel@gnu.org; Sat, 02 Dec 2023 20:41:29 -0500 Original-Received: from mail-qk1-x72f.google.com ([2607:f8b0:4864:20::72f]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1r9bU5-0001Ve-FY for guile-devel@gnu.org; Sat, 02 Dec 2023 20:41:29 -0500 Original-Received: by mail-qk1-x72f.google.com with SMTP id af79cd13be357-77dce4d41d5so183572585a.3 for ; Sat, 02 Dec 2023 17:41:22 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1701567682; x=1702172482; darn=gnu.org; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:from:to:cc:subject:date:message-id:reply-to; bh=42SSckzeHzgMPg0X+y8Ub3eoi/fwxks52Y6kNToHO6s=; b=anv/z9Nfbg+MFYLGq3MOv6bo9bMh4TZ56XbQ5okDS8rWVX32AIJD5weTXLhVsybrx5 1TQVGrTLIbx83KmoNWA0bmD89VusEhSTZZV8/0ZBjPLTBOqcQVgNAgwreQh4jEYL8q35 Qz2F/tdBIyviMQOmHd5oglsmol5svQX33rcpDBbR3fFDCfv8DZQOwXle9kH63p/5ffmV DiCMiEiEM3bqlbXGgs8wNP2iJ6DpCc9uRXjO36nP2cyCK0kP8FgU/l2l2klY0dbHbUlI GBQd6GQk2dqnnW4Siq17oGculi+lSYZ5hzNxOuduqVR8GLuVjUOWEVxxcKIwHVKxLGNM w9Bw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1701567682; x=1702172482; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=42SSckzeHzgMPg0X+y8Ub3eoi/fwxks52Y6kNToHO6s=; b=K4y6wIAT6sCZ4WCKngF+QrOckVQBeJBWS2ibdCqDOOR9BMGZ8InoVBBHmuh9Ft+4jA oijCdBtCw6ZeBphXLMNJzPbBAZ6Y5iqSgVO3J7MWsiwNG59nLCTrROhs0z8Ym2yW3CWs Uwi312TLP9cPJkvT6EXjlK0QVqLCrQicGiKmTHEx52FvC9+fS9srOb7ibzgs82Q+za1l dOu11XhXrp6ZcPTpcpBUTLa6kPYpL42VOkeDkFmFAsZT8v9jjG1bJj0akwp+l7eKvUni ouxk/t4McxtHYDRBIgq8fCap42AksKZqVqUtGCC2dZCyyiJ2kXrt++Jm8kKPc+0V0R9P XsZg== X-Gm-Message-State: AOJu0YxMprdr6kowUNEJoN8o+DbBprjcrbiTmq0NnIAccH9d0gyHEkJz xHt+nmpMeu2Ie8mRidGb8W9alIul9js= X-Google-Smtp-Source: AGHT+IHgWLGQpLft2zxKAm/QFncCahApW2JiKNrHTvtj7+8i3yczH5PI7Fx95EfnleeIqIfaeaPRdw== X-Received: by 2002:a05:620a:3986:b0:77f:551:e339 with SMTP id ro6-20020a05620a398600b0077f0551e339mr654842qkn.64.1701567681664; Sat, 02 Dec 2023 17:41:21 -0800 (PST) Original-Received: from localhost.localdomain (dsl-10-141-196.b2b2c.ca. [72.10.141.196]) by smtp.gmail.com with ESMTPSA id t15-20020a05620a450f00b0077dca8ed9a4sm2869664qkp.133.2023.12.02.17.41.20 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sat, 02 Dec 2023 17:41:21 -0800 (PST) X-Mailer: git-send-email 2.41.0 Received-SPF: pass client-ip=2607:f8b0:4864:20::72f; envelope-from=maxim.cournoyer@gmail.com; helo=mail-qk1-x72f.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: guile-devel@gnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "Developers list for Guile, the GNU extensibility library" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: guile-devel-bounces+guile-devel=m.gmane-mx.org@gnu.org Original-Sender: guile-devel-bounces+guile-devel=m.gmane-mx.org@gnu.org Xref: news.gmane.io gmane.lisp.guile.devel:22166 Archived-At: This series add the SRFI 209 enumerators library and its dependencies. It fixes a few problems that prevented using the corresponding R7RS upstream libraries as-is on the way. Changes in v6: - Add SRFI 209 Changes in v5: - Generate Texinfo menu entries - Update NEWS Changes in v4: - Mention Expat license of SRFI 126 in guile.tex copying section - Fix invalid module references (e.g. (srfi 69) -> (srfi srfi-69)) - Use .sld for srfi-128 library file extension - Mention Expat license of SRFI 128 in guile.tex copying section - Add copyright line in srfi-modules.texi - Mention Expat license of SRFI 125 in guile.tex copying section - Rename srfi-125.scm to srfi-125.sld and use upstream copy - Streamline import of (srfi srfi-125) - Use R7RS 'import' for srfi-125-test.scm - Mention Expat license of SRFI 151 in guile.tex copying section - Update copyright line for John Cowan in srfi-modules.texi - Rename srfi/srfi-151.scm to srfi/srfi-151.sld Changes in v3: - Rename SRFI-126 to SRFI 126 in text - Rename SRFI-128 to SRFI 128 in text - Replace srfi-128.scm with upstream srfi/128.sld - Add menu entries. - Rename SRFI-125 to SRFI 125 in text - Rename included file to upstream name (125.body.scm) - Add copyright/license header 125.body.scm - Add SRFI 151 Changes in v2: - Remove extraneous (ice-9 hash-table) import - Rename SRFI-69 to SRFI 69, SRFI-125 to SRFI 125 in text - Remove string-hash and symbol-hash from exports (they are already listed in #:rename) Maxim Cournoyer (15): ice-9: Fix 'include' when used in compilation contexts. r7rs-libraries: Add support for 'else' clause in cond-expand. r7rs-libraries: Better support R7RS SRFI library names. (scheme base): Support non-negative SRFI integer names in cond-expand. Share features tested by cond-expand library declarations and expressions. build: Register '.sld' as an alternative extension to '.scm'. module: Add SRFI 126. module: Add SRFI 128. module: Add (scheme comparator). module: Add (scheme sort). module: Add SRFI 125. module: Add SRFI 151. module: Add SRFI 160. module: Add SRFI 178. module: Add SRFI 209. Timothy Sample (1): Use R7RS 'rename' syntax for exports. .gitignore | 1 + NEWS | 20 + am/bootstrap.am | 75 +- configure.ac | 7 +- doc/ref/guile.texi | 25 +- doc/ref/srfi-modules.texi | 5347 ++++++++++++++++- libguile/fports.c | 41 +- module/ice-9/boot-9.scm | 123 +- module/ice-9/endianness.scm.in | 1 + module/ice-9/psyntax.scm | 8 +- module/ice-9/r6rs-libraries.scm | 88 +- module/ice-9/r7rs-libraries.scm | 68 +- module/scheme/base.scm | 15 +- module/scheme/comparator.sld | 33 + module/scheme/features.scm | 44 + module/scheme/sort.sld | 21 + module/srfi/srfi-125.sld | 96 + module/srfi/srfi-125/125.body.scm | 589 ++ module/srfi/srfi-126.scm | 396 ++ module/srfi/srfi-128.sld | 61 + module/srfi/srfi-128/128.body1.scm | 361 ++ module/srfi/srfi-128/128.body2.scm | 146 + module/srfi/srfi-151.sld | 56 + module/srfi/srfi-151/bitwise-33.scm | 108 + module/srfi/srfi-151/bitwise-60.scm | 70 + module/srfi/srfi-151/bitwise-other.scm | 62 + module/srfi/srfi-160/base.sld | 67 + .../srfi/srfi-160/base/c128-vector2list.scm | 18 + module/srfi/srfi-160/base/c64-vector2list.scm | 18 + module/srfi/srfi-160/base/complex.scm | 111 + module/srfi/srfi-160/base/f32-vector2list.scm | 18 + module/srfi/srfi-160/base/f64-vector2list.scm | 18 + module/srfi/srfi-160/base/r7rec.scm | 11 + module/srfi/srfi-160/base/s16-vector2list.scm | 18 + module/srfi/srfi-160/base/s32-vector2list.scm | 18 + module/srfi/srfi-160/base/s64-vector2list.scm | 18 + module/srfi/srfi-160/base/s8-vector2list.scm | 18 + module/srfi/srfi-160/base/u16-vector2list.scm | 18 + module/srfi/srfi-160/base/u32-vector2list.scm | 18 + module/srfi/srfi-160/base/u64-vector2list.scm | 18 + module/srfi/srfi-160/base/u8-vector2list.scm | 18 + module/srfi/srfi-160/base/valid.scm | 26 + module/srfi/srfi-160/c128-impl.scm | 600 ++ module/srfi/srfi-160/c128.sld | 48 + module/srfi/srfi-160/c64-impl.scm | 600 ++ module/srfi/srfi-160/c64.sld | 48 + module/srfi/srfi-160/f32-impl.scm | 600 ++ module/srfi/srfi-160/f32.sld | 48 + module/srfi/srfi-160/f64-impl.scm | 600 ++ module/srfi/srfi-160/f64.sld | 48 + module/srfi/srfi-160/s16-impl.scm | 600 ++ module/srfi/srfi-160/s16.sld | 48 + module/srfi/srfi-160/s32-impl.scm | 600 ++ module/srfi/srfi-160/s32.sld | 48 + module/srfi/srfi-160/s64-impl.scm | 600 ++ module/srfi/srfi-160/s64.sld | 48 + module/srfi/srfi-160/s8-impl.scm | 600 ++ module/srfi/srfi-160/s8.sld | 48 + module/srfi/srfi-160/u16-impl.scm | 600 ++ module/srfi/srfi-160/u16.sld | 48 + module/srfi/srfi-160/u32-impl.scm | 600 ++ module/srfi/srfi-160/u32.sld | 48 + module/srfi/srfi-160/u64-impl.scm | 600 ++ module/srfi/srfi-160/u64.sld | 48 + module/srfi/srfi-160/u8-impl.scm | 600 ++ module/srfi/srfi-160/u8.sld | 48 + module/srfi/srfi-178.sld | 105 + module/srfi/srfi-178/convert.scm | 83 + module/srfi/srfi-178/fields.scm | 88 + module/srfi/srfi-178/gen-acc.scm | 25 + module/srfi/srfi-178/logic-ops.scm | 105 + module/srfi/srfi-178/macros.scm | 26 + module/srfi/srfi-178/map2list.scm | 27 + module/srfi/srfi-178/quasi-ints.scm | 54 + module/srfi/srfi-178/quasi-strs.scm | 88 + module/srfi/srfi-178/unfolds.scm | 44 + module/srfi/srfi-178/wrappers.scm | 285 + module/srfi/srfi-209.sld | 60 + module/srfi/srfi-209/209.scm | 690 +++ test-suite/Makefile.am | 25 + test-suite/tests/r7rs-cond-expand.test | 35 + test-suite/tests/rnrs-libraries.test | 12 +- test-suite/tests/srfi-125-test.scm | 890 +++ test-suite/tests/srfi-125.test | 45 + test-suite/tests/srfi-126-test.scm | 289 + test-suite/tests/srfi-126.test | 49 + test-suite/tests/srfi-128-test.scm | 321 + test-suite/tests/srfi-128.test | 47 + test-suite/tests/srfi-151-test.scm | 381 ++ test-suite/tests/srfi-151.test | 46 + test-suite/tests/srfi-160-base-test.scm | 167 + test-suite/tests/srfi-160-base.test | 47 + test-suite/tests/srfi-160-test.scm | 262 + test-suite/tests/srfi-160.test | 48 + .../tests/srfi-178-test/constructors.scm | 88 + .../tests/srfi-178-test/conversions.scm | 108 + test-suite/tests/srfi-178-test/fields.scm | 98 + test-suite/tests/srfi-178-test/gen-accum.scm | 72 + test-suite/tests/srfi-178-test/iterators.scm | 150 + test-suite/tests/srfi-178-test/logic-ops.scm | 125 + test-suite/tests/srfi-178-test/mutators.scm | 79 + test-suite/tests/srfi-178-test/quasi-ints.scm | 41 + .../tests/srfi-178-test/quasi-string.scm | 62 + test-suite/tests/srfi-178-test/selectors.scm | 13 + test-suite/tests/srfi-178.test | 147 + test-suite/tests/srfi-209-test.scm | 465 ++ test-suite/tests/srfi-209.test | 50 + 107 files changed, 21463 insertions(+), 448 deletions(-) create mode 100644 module/ice-9/endianness.scm.in create mode 100644 module/scheme/comparator.sld create mode 100644 module/scheme/features.scm create mode 100644 module/scheme/sort.sld create mode 100644 module/srfi/srfi-125.sld create mode 100644 module/srfi/srfi-125/125.body.scm create mode 100644 module/srfi/srfi-126.scm create mode 100644 module/srfi/srfi-128.sld create mode 100644 module/srfi/srfi-128/128.body1.scm create mode 100644 module/srfi/srfi-128/128.body2.scm create mode 100644 module/srfi/srfi-151.sld create mode 100644 module/srfi/srfi-151/bitwise-33.scm create mode 100644 module/srfi/srfi-151/bitwise-60.scm create mode 100644 module/srfi/srfi-151/bitwise-other.scm create mode 100644 module/srfi/srfi-160/base.sld create mode 100644 module/srfi/srfi-160/base/c128-vector2list.scm create mode 100644 module/srfi/srfi-160/base/c64-vector2list.scm create mode 100644 module/srfi/srfi-160/base/complex.scm create mode 100644 module/srfi/srfi-160/base/f32-vector2list.scm create mode 100644 module/srfi/srfi-160/base/f64-vector2list.scm create mode 100644 module/srfi/srfi-160/base/r7rec.scm create mode 100644 module/srfi/srfi-160/base/s16-vector2list.scm create mode 100644 module/srfi/srfi-160/base/s32-vector2list.scm create mode 100644 module/srfi/srfi-160/base/s64-vector2list.scm create mode 100644 module/srfi/srfi-160/base/s8-vector2list.scm create mode 100644 module/srfi/srfi-160/base/u16-vector2list.scm create mode 100644 module/srfi/srfi-160/base/u32-vector2list.scm create mode 100644 module/srfi/srfi-160/base/u64-vector2list.scm create mode 100644 module/srfi/srfi-160/base/u8-vector2list.scm create mode 100644 module/srfi/srfi-160/base/valid.scm create mode 100644 module/srfi/srfi-160/c128-impl.scm create mode 100644 module/srfi/srfi-160/c128.sld create mode 100644 module/srfi/srfi-160/c64-impl.scm create mode 100644 module/srfi/srfi-160/c64.sld create mode 100644 module/srfi/srfi-160/f32-impl.scm create mode 100644 module/srfi/srfi-160/f32.sld create mode 100644 module/srfi/srfi-160/f64-impl.scm create mode 100644 module/srfi/srfi-160/f64.sld create mode 100644 module/srfi/srfi-160/s16-impl.scm create mode 100644 module/srfi/srfi-160/s16.sld create mode 100644 module/srfi/srfi-160/s32-impl.scm create mode 100644 module/srfi/srfi-160/s32.sld create mode 100644 module/srfi/srfi-160/s64-impl.scm create mode 100644 module/srfi/srfi-160/s64.sld create mode 100644 module/srfi/srfi-160/s8-impl.scm create mode 100644 module/srfi/srfi-160/s8.sld create mode 100644 module/srfi/srfi-160/u16-impl.scm create mode 100644 module/srfi/srfi-160/u16.sld create mode 100644 module/srfi/srfi-160/u32-impl.scm create mode 100644 module/srfi/srfi-160/u32.sld create mode 100644 module/srfi/srfi-160/u64-impl.scm create mode 100644 module/srfi/srfi-160/u64.sld create mode 100644 module/srfi/srfi-160/u8-impl.scm create mode 100644 module/srfi/srfi-160/u8.sld create mode 100644 module/srfi/srfi-178.sld create mode 100644 module/srfi/srfi-178/convert.scm create mode 100644 module/srfi/srfi-178/fields.scm create mode 100644 module/srfi/srfi-178/gen-acc.scm create mode 100644 module/srfi/srfi-178/logic-ops.scm create mode 100644 module/srfi/srfi-178/macros.scm create mode 100644 module/srfi/srfi-178/map2list.scm create mode 100644 module/srfi/srfi-178/quasi-ints.scm create mode 100644 module/srfi/srfi-178/quasi-strs.scm create mode 100644 module/srfi/srfi-178/unfolds.scm create mode 100644 module/srfi/srfi-178/wrappers.scm create mode 100644 module/srfi/srfi-209.sld create mode 100644 module/srfi/srfi-209/209.scm create mode 100644 test-suite/tests/r7rs-cond-expand.test create mode 100644 test-suite/tests/srfi-125-test.scm create mode 100644 test-suite/tests/srfi-125.test create mode 100644 test-suite/tests/srfi-126-test.scm create mode 100644 test-suite/tests/srfi-126.test create mode 100644 test-suite/tests/srfi-128-test.scm create mode 100644 test-suite/tests/srfi-128.test create mode 100644 test-suite/tests/srfi-151-test.scm create mode 100644 test-suite/tests/srfi-151.test create mode 100644 test-suite/tests/srfi-160-base-test.scm create mode 100644 test-suite/tests/srfi-160-base.test create mode 100644 test-suite/tests/srfi-160-test.scm create mode 100644 test-suite/tests/srfi-160.test create mode 100644 test-suite/tests/srfi-178-test/constructors.scm create mode 100644 test-suite/tests/srfi-178-test/conversions.scm create mode 100644 test-suite/tests/srfi-178-test/fields.scm create mode 100644 test-suite/tests/srfi-178-test/gen-accum.scm create mode 100644 test-suite/tests/srfi-178-test/iterators.scm create mode 100644 test-suite/tests/srfi-178-test/logic-ops.scm create mode 100644 test-suite/tests/srfi-178-test/mutators.scm create mode 100644 test-suite/tests/srfi-178-test/quasi-ints.scm create mode 100644 test-suite/tests/srfi-178-test/quasi-string.scm create mode 100644 test-suite/tests/srfi-178-test/selectors.scm create mode 100644 test-suite/tests/srfi-178.test create mode 100644 test-suite/tests/srfi-209-test.scm create mode 100644 test-suite/tests/srfi-209.test base-commit: d8df317bafcdd9fcfebb636433c4871f2fab28b2 -- 2.41.0