[plt-scheme] expand up to class forms

From: Matthew Flatt (mflatt at cs.utah.edu)
Date: Thu Apr 28 08:41:11 EDT 2005

At Wed, 27 Apr 2005 14:41:21 -0400, Dave Herman wrote:
> I've got a macro that expands into a `class*' form, and for debugging 
> I'd like to see what it expands to without having to see what the class 
> form expands to. If I use `local-expand' with #'class* in the stop-list, 
> then it doesn't expand anything, because the `class*' form itself does a 
> `local-expand' on its contents.
> 
> Would it be hard to write a utility that expands the guts of a class 
> without expanding any further?

I'm not sure I follow. Using `expand-once' enough times should get you
to the point where the expression is `class*', but it sounds like you
want to then expand the body expressions in `class*' without expanding
the `class*' form itself.

If that's right, then I think there's no way to get what you want out
of `class*', because `class*' can't expand itself without (partially)
expanding its body expressions, and it can't expand its body
expressions without expanding itself.

Matthew



Posted on the users mailing list.