[plt-scheme] Contracts and macros?
There isn't support for that now. I'm not even sure how to do that
properly in general.
In this specific case, you might try putting the `contract' form
directly into the expansion of the macro. Or it may be simpler to just
code up the checks yourself and call error.
Robby
On Thu, Jul 3, 2008 at 5:15 AM, Mark Engelberg <mark.engelberg at gmail.com> wrote:
> Is there a way to do any kind of contract checking on a macro?
>
> Here's the scenario I'm looking at:
> A macro is used to convert a certain syntactic sugar into a function
> call. I want to keep the function private, but provide the sugarized
> macro version to other modules.
>
> If I can't assign a contract to the macro, how can I ensure that blame
> is properly assigned? Is there a way to put a contract on the private
> function in a way that will assign blame to other modules which call
> the macro which expands to an incorrect call to the private function?
>
> --Mark
> _________________________________________________
> For list-related administrative tasks:
> http://list.cs.brown.edu/mailman/listinfo/plt-scheme
>
>