[plt-scheme] #%app literal does not match in syntax-case pattern

From: Marco Monteiro (masm at acm.org)
Date: Fri Nov 20 17:45:20 EST 2009

On Fri, Nov 20, 2009 at 10:17 PM, Eli Barzilay <eli at barzilay.org> wrote:

> On Nov 20, Marco Monteiro wrote:
> >
> > Now I'm trying a new approach. Instead of expanding the module in
> > the reader, I export a #%module-begin that replaces its subforms by
> > a new macro that code-walks by using local-expand and some other
> > hacks. This does not mix read and macro expansion levels, but I have
> > to 10 times more code.
>
> I didn't understand what you're trying to do in general?  Why do you
> need any kind of a code walker to begin with?
>
>
To expand the code. For example, I want to write

---
#lang masm/sines

(define (f) (lambda () 42))

(f)
---

and I want it evaluated as if I wrote this:

---
#lang my-module

(define-values (f) (#%app void))

(#%app void)

(store-code (list '(define-values (f) (lambda () (#%datum 42)) '(#%app f))
---

This is a simplification, because I also want to store some syntax
information, line number, etc. The definitions must stay in place
because the module may have a provide form that provides f.
The expressions must not be executed, because some of the
variables (f in this case) will not have the expected value
(a procedure in this case).

Actually, the idea was to have the evaluation of a module to build
its Scheme AST, that can later be transformed to a JavaScript AST.
There may be a much saner way to do this. And this may end up
not working. I'm just experimenting.

Marco
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.racket-lang.org/users/archive/attachments/20091120/86b7158e/attachment.html>

Posted on the users mailing list.