unofficial mirror of bug-guile@gnu.org 
 help / color / mirror / Atom feed
From: Mathieu Lirzin <mthl@gnu.org>
To: 24155@debbugs.gnu.org
Subject: bug#24155: SRFI-10: Example from the manual fails to execute.
Date: Fri, 05 Aug 2016 03:19:09 +0200	[thread overview]
Message-ID: <87popodnci.fsf@gnu.org> (raw)

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





             reply	other threads:[~2016-08-05  1:19 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-08-05  1:19 Mathieu Lirzin [this message]
2016-08-07  9:55 ` bug#24155: SRFI-10: Example from the manual fails to execute Andy Wingo
2016-08-10 18:51   ` Mathieu Lirzin

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.gnu.org/software/guile/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=87popodnci.fsf@gnu.org \
    --to=mthl@gnu.org \
    --cc=24155@debbugs.gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).