Re: Paging Mr. Rettig [ws Re: Explanation of macros; Haskellmacros]
prunesquallor_at_comcast.net
Date: 11/03/03
- Next message: Eric Wichterich: "Re: Malformed Header"
- Previous message: Peter Otten: "Re: programming languages (etc) "web popularity" fun"
- In reply to: Fergus Henderson: "Re: Paging Mr. Rettig [ws Re: Explanation of macros; Haskellmacros]"
- Next in thread: Fergus Henderson: "Re: Paging Mr. Rettig [ws Re: Explanation of macros; Haskellmacros]"
- Reply: Fergus Henderson: "Re: Paging Mr. Rettig [ws Re: Explanation of macros; Haskellmacros]"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Date: Mon, 03 Nov 2003 17:58:46 GMT
Fergus Henderson <fjh@cs.mu.oz.au> writes:
> prunesquallor@comcast.net writes:
>
>>Duane Rettig <duane@franz.com> writes:
>>
>>> Marcin 'Qrczak' Kowalczyk <qrczak@knm.org.pl> writes:
>>>
>>>> On Sun, 02 Nov 2003 02:01:58 -0800, Duane Rettig wrote:
>>>>
>>>> > With this much openness, it doesn't seem unreasonable
>>>> > to expect a debugger to be able to use such information to make macros
>>>> > and the forms they expand into completely debuggable and steppable at
>>>> > any desired level.
>>>>
>>>> Does any debugger do this?
>>>
>>> Most Lisp debuggers will do this with compiled code. I know of none which
>>> do this to compiled code without recompilation.
>>
>>MIT Scheme (which we all know is not Common Lisp) keeps around enough
>>debug information to determine the source code being executed at each
>>step in the compiled code. I don't recall if there is a compiled code
>>stepper per se, but crawling down the stack in compiled code shows the
>>source code that was being evaluated.
>
> Including macros invocations?
I don't think MIT Scheme tracks macro expansions.
However, PLT Scheme does. The compiler and macroexpander are
orthogonal, so in principle one could simply merge the two methods.
> When you say "source code", do you really mean source code, or do
> you mean the results of macro-expansion?
In PLT Scheme I really mean the source code.
> If I have a function foo whose body invokes a macro bar which calls a
> function baz, can I get a "stack trace" or equivalent which shows me the
> line in the definition of bar which invokes baz, and the line in the
> definition of foo which invokes bar? Can I see the bindings of the
> parameters of bar?
(define (baz x)
(+ x 3))
(define-syntax bar
(syntax-rules ()
((bar x) (begin0 (baz x) #f))))
(define (foo y)
(begin (bar y) #f))
> (foo 'a)
+: expects type <number> as 1st argument, given: a; other arguments were: 3
c:\home\jrm\test.ss:3:2: (+ x 3)
c:\home\jrm\test.ss:10:9: (begin0 (baz y) #f)
STDIN::105: (foo (quote a))
- Next message: Eric Wichterich: "Re: Malformed Header"
- Previous message: Peter Otten: "Re: programming languages (etc) "web popularity" fun"
- In reply to: Fergus Henderson: "Re: Paging Mr. Rettig [ws Re: Explanation of macros; Haskellmacros]"
- Next in thread: Fergus Henderson: "Re: Paging Mr. Rettig [ws Re: Explanation of macros; Haskellmacros]"
- Reply: Fergus Henderson: "Re: Paging Mr. Rettig [ws Re: Explanation of macros; Haskellmacros]"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Relevant Pages
|