[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Macros and DrScheme



Quoting Eli Barzilay:
> | > (parameterize ((current-namespace (make-namespace)))
> |     (eval '(define-macro lambda (lambda x `(#%+ ,@x))))
> |     (eval '(lambda 1 2)))
> | 3
> | > (lambda 1 2)
> | 3
> | > (#%lambda 1 2)
> | 3
> 
> ... it does work as expected when the no-debugging versions are used.
> 
> So the question is: is this a bug? 

Definitely. This is a bug, too:

 > (define-macro lambda (lambda x `(#%+ ,@x)))
 > (#%lambda 1 2)
 3

> Is it possible to modify these things by hacking DrScheme?

Well, yes, by fixing the bug. :) We might have a fix, but it will take
a little more time to be sure...

Meanwhile, you can circumvent part of what 102 does differently from
102 by changing `friendly-current-namespace?' in
plt/collects/userspce/init-paramr.ss so that it always returns #f. I
think that would fix the bug as you saw it.

Matthew