unofficial mirror of guile-devel@gnu.org 
 help / color / mirror / Atom feed
* Recent change to syncase.scm
@ 2003-01-16 12:01 Mikael Djurfeldt
  2003-01-16 12:41 ` Mikael Djurfeldt
  2003-02-07  4:13 ` Rob Browning
  0 siblings, 2 replies; 4+ messages in thread
From: Mikael Djurfeldt @ 2003-01-16 12:01 UTC (permalink / raw)
  Cc: djurfeldt

Just F.Y.I.:

I've enabled Guile macro macro expansion in syntax-case macro
expansion.  This means that, for the first time, Guile macros and
syntax-case macros should play reasonably well together.

One of the good effects is that goops code now can use syntax-case
macros.

There is one constraint, however: Macro expansion is made in advance
of evaluation.  This has the effect that the environment argument of
the Guile macro transformer can't easily be used for looking up
bindings.  It *is* still possible to use it to differ between
top-level and a lexical environment, though.  It is also possible to
extract the eval-closure.

It *is* possible to make them play perfectly together, by delaying
expansion (and further syncase expansion) until evaluation, but I
figured this wasn't very useful since Dirk is working on
pre-evaluation expansion anyway.

Best regards,
M


_______________________________________________
Guile-devel mailing list
Guile-devel@gnu.org
http://mail.gnu.org/mailman/listinfo/guile-devel


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

* Re: Recent change to syncase.scm
  2003-01-16 12:01 Recent change to syncase.scm Mikael Djurfeldt
@ 2003-01-16 12:41 ` Mikael Djurfeldt
  2003-02-07  4:13 ` Rob Browning
  1 sibling, 0 replies; 4+ messages in thread
From: Mikael Djurfeldt @ 2003-01-16 12:41 UTC (permalink / raw)
  Cc: Marius Vollmer

Mikael Djurfeldt <mdj@kvast.blakulla.net> writes:

> It is also possible to extract the eval-closure.

(Which can be the wrong one.  In order to make syncase work well
together with the module system it needs to store the top-level
environment in its own data structures.  The current use of the
expansion-eval-closure fluid works in many cases, though.)



_______________________________________________
Guile-devel mailing list
Guile-devel@gnu.org
http://mail.gnu.org/mailman/listinfo/guile-devel


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

* Re: Recent change to syncase.scm
  2003-01-16 12:01 Recent change to syncase.scm Mikael Djurfeldt
  2003-01-16 12:41 ` Mikael Djurfeldt
@ 2003-02-07  4:13 ` Rob Browning
  2003-02-07  7:01   ` Mikael Djurfeldt
  1 sibling, 1 reply; 4+ messages in thread
From: Rob Browning @ 2003-02-07  4:13 UTC (permalink / raw)
  Cc: Marius Vollmer

Mikael Djurfeldt <mdj@kvast.blakulla.net> writes:

> I've enabled Guile macro macro expansion in syntax-case macro
> expansion.  This means that, for the first time, Guile macros and
> syntax-case macros should play reasonably well together.
>
> One of the good effects is that goops code now can use syntax-case
> macros.

Hmm, I wonder if this means that hobbit might be closer to working
again.  One of the big issues last time I was playing with it was that
there was no way to get all macros "fully expanded" before passing
them to hobbit.

-- 
Rob Browning
rlb @defaultvalue.org, @linuxdevel.com, and @debian.org
Previously @cs.utexas.edu
GPG starting 2002-11-03 = 14DD 432F AE39 534D B592  F9A0 25C8 D377 8C7E 73A4


_______________________________________________
Guile-devel mailing list
Guile-devel@gnu.org
http://mail.gnu.org/mailman/listinfo/guile-devel


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

* Re: Recent change to syncase.scm
  2003-02-07  4:13 ` Rob Browning
@ 2003-02-07  7:01   ` Mikael Djurfeldt
  0 siblings, 0 replies; 4+ messages in thread
From: Mikael Djurfeldt @ 2003-02-07  7:01 UTC (permalink / raw)
  Cc: guile-devel

Rob Browning <rlb@defaultvalue.org> writes:

> Mikael Djurfeldt <mdj@kvast.blakulla.net> writes:
>
>> I've enabled Guile macro macro expansion in syntax-case macro
>> expansion.  This means that, for the first time, Guile macros and
>> syntax-case macros should play reasonably well together.
>>
>> One of the good effects is that goops code now can use syntax-case
>> macros.
>
> Hmm, I wonder if this means that hobbit might be closer to working
> again.  One of the big issues last time I was playing with it was that
> there was no way to get all macros "fully expanded" before passing
> them to hobbit.

This is true, although there are some caveats: The syntax-case macro
expansion code does not expand macros of type "syntax" (acros).  While
this would be easy to do, it is not meaningful since acros should be
evaluated during evaluation-time.  Also, macros which depend on the
detailed representation of the environment will fail.

I suggest you have a look at the expansion code in syncase.scm.  It's
quite simple.  It basically only extracts the transformer and calls
it.

M



_______________________________________________
Guile-devel mailing list
Guile-devel@gnu.org
http://mail.gnu.org/mailman/listinfo/guile-devel


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

end of thread, other threads:[~2003-02-07  7:01 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2003-01-16 12:01 Recent change to syncase.scm Mikael Djurfeldt
2003-01-16 12:41 ` Mikael Djurfeldt
2003-02-07  4:13 ` Rob Browning
2003-02-07  7:01   ` Mikael Djurfeldt

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