unofficial mirror of guile-user@gnu.org 
 help / color / mirror / Atom feed
From: Julian Graham <joolean@gmail.com>
To: Andy Wingo <wingo@pobox.com>
Cc: Guile Users <guile-user@gnu.org>, Neil Jerram <neil@ossau.uklinux.net>
Subject: Re: wrapping `define-syntax'
Date: Sat, 18 Apr 2009 16:52:26 -0400	[thread overview]
Message-ID: <2bc5f8210904181352y75aa5688m2da52bbbc82c814c@mail.gmail.com> (raw)
In-Reply-To: <m37i1m401e.fsf@pobox.com>

Hi Andy,

> The final paragraph of 7.2 seems to imply that these additional bindings
> may also be present for the runtime phase, which would obviate the need
> for the temporary modules.

I take it you're referring to this sentence?

"When an identifier appears as an expression in a phase that is
inconsistent with the identifier’s level, then an implementation may
raise an exception either at expand time or run time, or it may allow
the reference."

Yeah, you're right -- I'd forgotten about this.  (This totally sounds
like another case of R6RS accommodating existing implementations with
complicated behavior while letting new ones off the hook.)


> This means you have to give names to those intermediate modules, because
> syncase's output has to be serializable. It doesn't seem like named
> temporary modules are a good idea.

Fair enough, although this makes me curious about uniqueness
constraints on module names in the context of syncase -- I'm guessing
that `@' and `@@' rely on the global registry that `define-module'
writes to (and to which `make-module' doesn't).  What would you
recommend with regard to naming and registering dynamically-created
modules / interfaces?

This probably belongs on guile-devel, but what I'm getting at is that
the `import' form allows for the creation of interfaces layered on top
of interfaces to an arbitrarily deep extent.  So it looks like R6RS
library support's gonna need a way to serialize the export interface
of a module that's created dynamically (as an interface to another
module / interface) in order to provide a unique name for that module
so that `@' and `@@' can refer to it.


> Why not import the bindings needed at expansion time, evaluate keyword
> definitions, then import other bindings needed at runtime, then evaluate
> variable definitions and expressions? No temporary modules would be
> necessary.

Well, it's a little bit more involved, since local syntax definitions
(`let-syntax' etc.) also require phased imports -- could we import
phased bindings for "meta" phases >= 2 at the same time we bring in
the "expand" phase bindings?


Regards,
Julian




  reply	other threads:[~2009-04-18 20:52 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-04-12 22:55 wrapping `define-syntax' Julian Graham
2009-04-13  9:35 ` Neil Jerram
2009-04-13 13:39   ` Julian Graham
2009-04-13 13:55   ` Julian Graham
2009-04-15 11:41     ` Andy Wingo
2009-04-18 20:52       ` Julian Graham [this message]
2009-04-15 11:25 ` Andy Wingo
2009-04-17  3:42   ` 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=2bc5f8210904181352y75aa5688m2da52bbbc82c814c@mail.gmail.com \
    --to=joolean@gmail.com \
    --cc=guile-user@gnu.org \
    --cc=neil@ossau.uklinux.net \
    --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).