unofficial mirror of guile-devel@gnu.org 
 help / color / mirror / Atom feed
From: Julian Graham <joolean@gmail.com>
To: Andy Wingo <wingo@pobox.com>
Cc: guile-devel <guile-devel@gnu.org>
Subject: Re: r6rs standard libraries
Date: Mon, 15 Feb 2010 15:33:55 -0500	[thread overview]
Message-ID: <2bc5f8211002151233g4af7d4ehe16b809eac623528@mail.gmail.com> (raw)
In-Reply-To: <2bc5f8211002080802s186a1da1h1bce05ce5f32a8e2@mail.gmail.com>

Hello again,


> Does this sound plausible?  I spent most of this past weekend trying
> to grok this and work around it (via various `eval'-based
> incantations) without much luck.  (The weird part is, I don't recall
> this happening with my old `(ice-9 r6rs-libraries)' module
> implementation, but I could be wrong.)

In case it's helpful, I've distilled the problem down to the following
self-contained example:

(define-module (foo))
(define-syntax foo
  (lambda (stx)
    (syntax-case ((_ x) (syntax (display x))))))
(foo 'bar)

...which has the side-effect of outputting the string "'bar" when
loaded from disk, whereas the following:

(begin
  (define-module (foo))
  (define-syntax foo
    (lambda (stx)
      (syntax-case ((_ x) (syntax (display x))))))
  (foo 'bar))

...produces the following error:

  ERROR: In procedure vm-debug-engine:
  ERROR: Wrong type to apply: #<syntax-transformer foo>

Note that the `define-module' form at the top is related to the error
-- without it, both examples work just fine.  (Wild speculation: Is it
possible that in the context of changes to the "current module" that
`define-syntax' puts bindings in a place different from where the
expander is looking for them?)


Regards,
Julian




  reply	other threads:[~2010-02-15 20:33 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-01-24 17:53 r6rs standard libraries Julian Graham
2010-01-25 14:50 ` Andy Wingo
2010-01-25 17:37   ` Ludovic Courtès
2010-01-25 21:41     ` Andy Wingo
2010-01-26 14:35       ` Ludovic Courtès
2010-01-26 19:35         ` Andy Wingo
2010-01-28 21:54           ` Neil Jerram
2010-01-29  3:04             ` Grant Rettke
2010-01-29  3:52   ` Julian Graham
2010-02-06 17:50     ` Julian Graham
2010-02-07 10:30       ` Andy Wingo
2010-02-08 16:02         ` Julian Graham
2010-02-15 20:33           ` Julian Graham [this message]
2010-02-24  5:47             ` Julian Graham

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=2bc5f8211002151233g4af7d4ehe16b809eac623528@mail.gmail.com \
    --to=joolean@gmail.com \
    --cc=guile-devel@gnu.org \
    --cc=wingo@pobox.com \
    /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).