This is the mail archive of the kawa@sourceware.org mailing list for the Kawa project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: <srfi-hash-table> unbound in kawa-1.9.90


* Kaloian Doganov [2010-02-03 20:03+0100] writes:

> Is this intentional?  

Probably. <srfi-hash-table> isn't mentioned in the SRFI document.

> And if it is, what is the new name of <srfi-hash-table>?  
> How one is supposed to use the hashtable type with
> `instance?'?

This seems to work:

(import (srfi :69)) ; same as (require 'srfi-69)
(import (kawa hashtable))  ; srfi-69 is implemented on top of this.
(instance? (make-hash-table) hashtable) ; => t

Alternatively you could do

(import (rename (only (kawa hashtable) hashtable)
                (hashtable <srfi-hash-table>)))

which only imports the binding for "hashtable" but renamed to
"<srfi-hash-table>".

Of course, using hash-table? instead of instance? would have the benefit
of being more portable.

Helmut


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]