[plt-scheme] plt-scheme 4.0 error - set!: cannot modify a constant:

From: Chongkai Zhu (czhu at cs.utah.edu)
Date: Thu Jun 19 12:11:32 EDT 2008

I don't think this is about v4.

In v3xx, you use the MzScheme langauge (or similar), and do trace in the 
REPL, which is all fine

In v4 now, you are using the module language (#lang scheme, or similar), 
and still want to do the trace in REPL, which is not allowed.

Just move your

(require (lib "trace.ss"))
(trace foo)

lines into the body of the module will solve the problem.


Scott Brown wrote:
> In earlier versions of plt-scheme I could trace functions like this:
> (require (lib "trace.ss"))
> (trace foo)
> But in plt-scheme 4.0 this gives an error:
> set!: cannot modify a constant: foo
> How can I fix this?
>       Get the name you always wanted with the new y7mail email address.
> www.yahoo7.com.au/mail
> _________________________________________________
>   For list-related administrative tasks:
>   http://list.cs.brown.edu/mailman/listinfo/plt-scheme

Posted on the users mailing list.