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: Wed, 24 Feb 2010 00:47:33 -0500	[thread overview]
Message-ID: <2bc5f8211002232147o31a88f91yecf00faec3a52fc9@mail.gmail.com> (raw)
In-Reply-To: <2bc5f8211002151233g4af7d4ehe16b809eac623528@mail.gmail.com>

Hi all,


> ...
>
> 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?)

Some (potentially misguided) digging around in psyntax.scm suggests
that changes to the current module (via `eval-when' forms, e.g.)
indeed are not properly reflected in the expansion environment within
"chi-top-sequence" because of re-use of the hygiene structure (or
"mod" as it's often referred to in psyntax).  The problem goes away
when I construct a fresh mod for expansion of each expression in the
sequence:

(define chi-top-sequence
  (lambda (body r w s m esew mod)
    (build-sequence s
      (let dobody ((body body) (r r) (w w) (m m) (esew esew) (mod mod))
        (if (null? body)
          '()
          (let ((first (chi-top (car body) r w m esew (cons 'hygiene
(module-name (current-module))))))
            (cons first (dobody (cdr body) r w m esew (cons 'hygiene
(module-name (current-module)))))))))))

But that doesn't strike me as being the whole story.  Anyone have some
cycles to help me figure what the right thing to do is here?


Thanks,
Julian




      reply	other threads:[~2010-02-24  5:47 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
2010-02-24  5:47             ` Julian Graham [this message]

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=2bc5f8211002232147o31a88f91yecf00faec3a52fc9@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).