unofficial mirror of guile-user@gnu.org 
 help / color / mirror / Atom feed
From: Neil Jerram <neil@ossau.uklinux.net>
To: Julian Graham <joolean@gmail.com>
Cc: Guile Users <guile-user@gnu.org>
Subject: Re: wrapping `define-syntax'
Date: Mon, 13 Apr 2009 10:35:15 +0100	[thread overview]
Message-ID: <8763h8rj58.fsf@arudy.ossau.uklinux.net> (raw)
In-Reply-To: <2bc5f8210904121555v1090cb8ej6602f72beefa2f20@mail.gmail.com> (Julian Graham's message of "Sun\, 12 Apr 2009 18\:55\:22 -0400")

Julian Graham <joolean@gmail.com> writes:

> Hi Guilers,

Hi!

> For the purpose of some experiments I've been doing with integrating
> R6RS libraries, I've been trying to figure out ways to wrap
> `define-syntax' so that I can do things like add bindings to a
> module's eval closure before evaluating a macro definition.

Can you give an example?

>  As part
> of this mechanism, I need to be able to save the original transformer
> for `define-syntax' so that I can delegate to it.  When I run the
> following code (either in master or Andy Wingo's "syncase" branch)...
>
>   (use-modules (ice-9 syncase))
>   (define canonical-define-syntax (@ (ice-9 syncase) define-syntax))
>   (canonical-define-syntax foo (syntax-rules () ((_) 'foo)))
>
> ...I get:
>
>   ERROR: In procedure vm-run:
>   ERROR: VM: Stack overflow

Hmm.  I don't really have much idea... but given that define-syntax is
syntax, does (define-syntax canonical-define-syntax define-syntax)
work any better?  Also does it make any difference if you use
use-syntax instead of use-modules ?

Regards,
        Neil




  reply	other threads:[~2009-04-13  9:35 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 [this message]
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
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=8763h8rj58.fsf@arudy.ossau.uklinux.net \
    --to=neil@ossau.uklinux.net \
    --cc=guile-user@gnu.org \
    --cc=joolean@gmail.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).