;;; srfi-125.scm -- SRFI 125 - Intermediate hash tables.
;;; Adapted from srfi-125.sld, made necessary due to bug#67255.

;;      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 library; if not, write to the Free Software
;; Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA

(define-module (srfi srfi-125)
  #:use-module ((rnrs base) :version (6) #:hide (error))
  #:use-module (srfi srfi-126)
  #:use-module ((srfi srfi-128) #:hide (hash-salt string-hash string-ci-hash))
  #:replace (hash-table? make-hash-table)
  #:export (hash-table hash-table-unfold
            alist->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:
            deprecated:hash
            deprecated:string-hash
            deprecated:string-ci-hash
            deprecated:hash-by-identity

            deprecated:hash-table-equivalence-function
            deprecated:hash-table-hash-function
            deprecated:hash-table-exists?
            deprecated:hash-table-walk
            deprecated:hash-table-merge!))

(include-from-path "srfi/srfi-125/125.body.scm")
