[plt-scheme] Macro stepper gone wild

From: Matthias Felleisen (matthias at ccs.neu.edu)
Date: Wed Oct 10 18:08:59 EDT 2007

I don't think the macro stepper is intended for, eh, 'macros'. It's  
really a tool to inspect 'syntax'. -- Matthias




On Oct 10, 2007, at 6:06 PM, Majorinc, Kazimir wrote:

> This macro works fine but Macro stepper (371) behaves wildly and
> reports some internal errors.
>
> (define-macro (!!! . args0)
> (cons 'begin
> (map (λ(p)
> `(define-macro
> ,(cons (string->symbol
> (string-append (symbol->string p) "!"))
> 'args)
> `(begin (set! ,(car args) ,
> (append (list (quote ,p)) args))
> ,(car args))))
> args0)))
>
> (!!! or and + - sin max min string-append cons)
>
> (define x 3)
> (+! x 1)
> (max! x 2)
> (max! x 5)
> -------
> output (as it should be):
> 4
> 4
> 5
> -------
> (!!! + - ...) defines macros +!, -! ... such that
> (+! x expr) expands in (set! x (+ x expr)) ...
>
> What's going on? Is it my or PLT bug? I think it is at least partly
> PLT because whatever is wrong, it shouldn't be internal error.
>
> Thank you,
> Kazimir Majorinc
> _________________________________________________
>  For list-related administrative tasks:
>  http://list.cs.brown.edu/mailman/listinfo/plt-scheme



Posted on the users mailing list.