[racket] Trace rejects set!

From: michael rice (nowgate at yahoo.com)
Date: Mon Oct 10 13:55:06 EDT 2011

Thanks, Vincent.

I didn't know traces had to be in the program itself.


From: Vincent St-Amour <stamourv at ccs.neu.edu>
To: michael rice <nowgate at yahoo.com>
Cc: Vincent St-Amour <stamourv at ccs.neu.edu>; Racket Users <users at racket-lang.org>
Sent: Monday, October 10, 2011 1:49 PM
Subject: Re: [racket] Trace rejects set!

At Mon, 10 Oct 2011 10:31:39 -0700 (PDT),
michael rice wrote:
> Welcome to DrRacket, version 5.1.3 [3m].
> Language: racket; memory limit: 128 MB.
> > (trace next-leaf-generator)
> set!: cannot modify a constant: next-leaf-generator

Try adding `(trace next-leaf-generator)' to the program itself, that
should work.

The interactions window is not part of the program, which is in its
own module. Since you can't mutate variables except in the module
where they're defined, you can't add tracing from the interactions

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.racket-lang.org/users/archive/attachments/20111010/35308448/attachment.html>

Posted on the users mailing list.