unofficial mirror of bug-guile@gnu.org 
 help / color / mirror / Atom feed
* bug#24155: SRFI-10: Example from the manual fails to execute.
@ 2016-08-05  1:19 Mathieu Lirzin
  2016-08-07  9:55 ` Andy Wingo
  0 siblings, 1 reply; 3+ messages in thread
From: Mathieu Lirzin @ 2016-08-05  1:19 UTC (permalink / raw)
  To: 24155

Hello,

The following example from the Guile manual in subsection 7.5.9, fails
for me both on Guile master 2.1.3.94-1a1c3 and Guile 2.0.11 from Debian
Testing.

--8<---------------cut here---------------start------------->8---
     (use-modules (srfi srfi-10))

     (define-reader-ctor 'hash
       (lambda elems
         (let ((table (make-hash-table)))
           (for-each (lambda (elem)
                       (apply hash-set! table elem))
                     elems)
           table)))

     (define (animal->family animal)
       (hash-ref '#,(hash ("tiger" "cat")
                          ("lion"  "cat")
                          ("wolf"  "dog"))
                 animal))
--8<---------------cut here---------------end--------------->8---

The error is:

--8<---------------cut here---------------start------------->8---
While compiling expression:
ERROR: build-constant-store: unrecognized object #<hash-table 1c52c80 3/31>
--8<---------------cut here---------------end--------------->8---

Thanks,

-- 
Mathieu Lirzin





^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2016-08-10 18:51 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2016-08-05  1:19 bug#24155: SRFI-10: Example from the manual fails to execute Mathieu Lirzin
2016-08-07  9:55 ` Andy Wingo
2016-08-10 18:51   ` Mathieu Lirzin

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).