[racket] how to trace stack by command line tools?

From: zermelo (zermelo at teletu.it)
Date: Fri Feb 3 09:09:44 EST 2012

On Thu, 02 Feb 2012 14:32:28 -0500, Eli Barzilay wrote:

> A few minutes ago, Danny Yoo wrote:
>> Here's how to work around this:  you can add the following right after
>> a definition, such as f:
>>     #lang racket
>>     (require racket/trace)
>>     (define (f x) (* x x))
>>     (set! f f)
>> The set! there is a no-op, but it effectively tells Racket not to
>> enforce the constantness of f.  Then trace can be run on it from
>> Interactions.
> Perhaps an easier approach is to just trace it inside the definitions:
>     #lang racket
>     (require racket/trace)
>     (define (f x) (* x x))
>     (trace f)


Posted on the users mailing list.