Issue #270
resolved
The following code works:
(import (srfi 69)) (import (rnrs)) (make-hash-table equal?)
This one doesn’t:
(import (srfi 69)) (import (scheme base)) (make-hash-table equal?)
The result of the second invocation is:
Unhandled exception Condition components: 1. &assertion 2. &who make-hash-table 3. &message unknown equivalent procedure 4. &irritants (#<subr equal? 2:0>) 5. &stack-trace stack trace: [1] assertion-violation [2] eval [3] #f src: ((current-evaluator) form interactive-environment) "/usr/local/share/sagittarius/0.9.7/lib/sagittarius/interactive.scm":147 [4] with-error-handler [5] read-eval-print-loop src: (call-with-current-continuation (lambda (continue) "/usr/local/share/sagittarius/0.9.7/lib/sagittarius/interactive.scm":130 [6] eval
We probably need another clause here:
diff --git a/sitelib/srfi/%3a69/basic-hash-tables.scm b/sitelib/srfi/%3a69/basic-hash-tables.scm index d8f61be..57195e1 100644 --- a/sitelib/srfi/%3a69/basic-hash-tables.scm +++ b/sitelib/srfi/%3a69/basic-hash-tables.scm @@ -55,6 +55,7 @@ (eq-hash hash-by-identity)) string-hash string-ci-hash) (import (rnrs) + (prefix (scheme base) r7rs:) ;; make-string-hashtable and make-equal-hashtable (sagittarius) (sagittarius control) @@ -68,6 +69,7 @@ (cond ((eq? eql? eq?) (make-eq-hashtable)) ((eq? eql? eqv?) (make-eqv-hashtable)) ((eq? eql? equal?) (make-equal-hashtable)) + ((eq? eql? r7rs:equal?) (make-equal-hashtable)) ((eq? eql? string=?) (make-string-hashtable)) ((eq? eql? string-ci=?) (make-hashtable string-ci=? string-ci-hash)) (else
Comments (2)
-
repo owner -
repo owner - changed status to resolved
(Applying patch) Handling r7rs equal? on make-hash-table (Fixes
#270)→ <<cset fae7e10afcc0>>
- Log in to comment
Thank you for the report! Valid point. I’ll apply the patch.