[racket] Problem with macro

From: Robby Findler (robby at eecs.northwestern.edu)
Date: Fri Aug 12 08:39:16 EDT 2011

Unfortunately, that position in a 'case' expression is not a place
where macro expansion happens. You can, however, use a 'cond' instead
of 'case'.

Robby

On Fri, Aug 12, 2011 at 7:33 AM, Casey Klein
<clklein at eecs.northwestern.edu> wrote:
> On Fri, Aug 12, 2011 at 7:26 AM, Jay McCarthy <jay.mccarthy at gmail.com> wrote:
>> 2011/8/11 Racket Noob <racketnoob at hotmail.com>:
>>>
>>> (define-syntax automaton
>>>   (syntax-rules (: -> END)
>>>     [(_ init-state
>>>         (state : transition ...)
>>>         ...)
>>>      (letrec ([curr-state empty]
>>>               [state
>>>                (lambda (symbol)
>>>                  (case symbol
>>>                    [(process-state transition)]
>>
>> The line above here should be a case clause, but it only has one part.
>> I think you meant [process-state transition]
>>
>
> That doesn't fix it. He needs the uses of `process-state' to be
> expanded before the `case' is expanded.
>
> _________________________________________________
>  For list-related administrative tasks:
>  http://lists.racket-lang.org/listinfo/users
>



Posted on the users mailing list.