srfi-128.scm 1.9 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546
  1. ;;; srfi-128.scm -- SRFI 128 - Comparators.
  2. ;;; Adapted from srfi-128.sld.
  3. ;; Copyright (C) 2023 Free Software Foundation, Inc.
  4. ;;
  5. ;; This library is free software; you can redistribute it and/or
  6. ;; modify it under the terms of the GNU Lesser General Public
  7. ;; License as published by the Free Software Foundation; either
  8. ;; version 3 of the License, or (at your option) any later version.
  9. ;;
  10. ;; This library is distributed in the hope that it will be useful,
  11. ;; but WITHOUT ANY WARRANTY; without even the implied warranty of
  12. ;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
  13. ;; Lesser General Public License for more details.
  14. ;;
  15. ;; You should have received a copy of the GNU Lesser General Public
  16. ;; License along with this library; if not, write to the Free Software
  17. ;; Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
  18. (define-module (srfi srfi-128)
  19. #:use-module ((rnrs base) :version (6) #:hide (error))
  20. #:use-module (rnrs bytevectors)
  21. #:use-module ((rnrs hashtables) #:select (equal-hash))
  22. #:use-module ((rnrs unicode) :version (6))
  23. #:use-module (srfi srfi-9)
  24. #:export (comparator?
  25. comparator-ordered? comparator-hashable?
  26. make-comparator
  27. make-pair-comparator make-list-comparator make-vector-comparator
  28. make-eq-comparator make-eqv-comparator make-equal-comparator
  29. boolean-hash char-hash char-ci-hash
  30. string-ci-hash number-hash
  31. make-default-comparator default-hash comparator-register-default!
  32. comparator-type-test-predicate comparator-equality-predicate
  33. comparator-ordering-predicate comparator-hash-function
  34. comparator-test-type comparator-check-type comparator-hash
  35. hash-bound hash-salt
  36. =? <? >? <=? >=?
  37. comparator-if<=>)
  38. #:replace (string-hash symbol-hash))
  39. (include-from-path "srfi/srfi-128/128.body1.scm")
  40. (include-from-path "srfi/srfi-128/128.body2.scm")