[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PATCH v4 06/10] module: Add (scheme comparator).
From: |
Maxim Cournoyer |
Subject: |
[PATCH v4 06/10] module: Add (scheme comparator). |
Date: |
Wed, 22 Nov 2023 22:25:17 -0500 |
* module/scheme/comparator.sld: New R7RS library shim for SRFI 128.
* am/bootstrap.am (SOURCES): Register it.
---
(no changes since v1)
am/bootstrap.am | 1 +
module/scheme/comparator.sld | 33 +++++++++++++++++++++++++++++++++
2 files changed, 34 insertions(+)
create mode 100644 module/scheme/comparator.sld
diff --git a/am/bootstrap.am b/am/bootstrap.am
index 0128ae170..2990d91c3 100644
--- a/am/bootstrap.am
+++ b/am/bootstrap.am
@@ -277,6 +277,7 @@ SOURCES = \
scheme/base.scm \
scheme/case-lambda.scm \
scheme/char.scm \
+ scheme/comparator.sld \
scheme/complex.scm \
scheme/cxr.scm \
scheme/eval.scm \
diff --git a/module/scheme/comparator.sld b/module/scheme/comparator.sld
new file mode 100644
index 000000000..5016e4392
--- /dev/null
+++ b/module/scheme/comparator.sld
@@ -0,0 +1,33 @@
+;;; comparator.sld --- R7RS library exposing SRFI 128.
+
+;;; Copyright (C) 2023 Free Software Foundation, Inc.
+;;;
+;;; This library is free software: you can redistribute it and/or modify
+;;; it under the terms of the GNU Lesser General Public License as
+;;; published by the Free Software Foundation, either version 3 of the
+;;; License, or (at your option) any later version.
+;;;
+;;; This library is distributed in the hope that it will be useful, but
+;;; WITHOUT ANY WARRANTY; without even the implied warranty of
+;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+;;; Lesser General Public License for more details.
+;;;
+;;; You should have received a copy of the GNU Lesser General Public
+;;; License along with this program. If not, see
+;;; <http://www.gnu.org/licenses/>.
+
+(define-library (scheme comparator)
+ (export comparator? comparator-ordered? comparator-hashable?
+ make-comparator
+ make-pair-comparator make-list-comparator make-vector-comparator
+ make-eq-comparator make-eqv-comparator make-equal-comparator
+ boolean-hash char-hash char-ci-hash
+ string-hash string-ci-hash symbol-hash number-hash
+ make-default-comparator default-hash comparator-register-default!
+ comparator-type-test-predicate comparator-equality-predicate
+ comparator-ordering-predicate comparator-hash-function
+ comparator-test-type comparator-check-type comparator-hash
+ hash-bound hash-salt
+ =? <? >? <=? >=?
+ comparator-if<=>)
+ (import (srfi 128)))
--
2.41.0
- [PATCH v4 00/10] Add a few new SRFIs, R7RS libraries, Maxim Cournoyer, 2023/11/22
- [PATCH v4 01/10] ice-9: Fix 'include' when used in compilation contexts., Maxim Cournoyer, 2023/11/22
- [PATCH v4 02/10] Use R7RS 'rename' syntax for exports., Maxim Cournoyer, 2023/11/22
- [PATCH v4 04/10] module: Add SRFI 126., Maxim Cournoyer, 2023/11/22
- [PATCH v4 07/10] module: Add (scheme sort)., Maxim Cournoyer, 2023/11/22
- [PATCH v4 06/10] module: Add (scheme comparator).,
Maxim Cournoyer <=
- [PATCH v4 05/10] module: Add SRFI 128., Maxim Cournoyer, 2023/11/22
- [PATCH v4 03/10] build: Register '.sld' as an alternative extension to '.scm'., Maxim Cournoyer, 2023/11/22
- [PATCH v4 08/10] module: Add SRFI 125., Maxim Cournoyer, 2023/11/22
- [PATCH v4 09/10] module: Add SRFI 151., Maxim Cournoyer, 2023/11/22
- [PATCH v4 10/10] module: Add SRFI 160., Maxim Cournoyer, 2023/11/22