Thanks I will give that a spin ;) <br><br><div><span class="gmail_quote">On 3/22/07, <b class="gmail_sendername">Jon Rafkind</b> <<a href="mailto:workmin@ccs.neu.edu">workmin@ccs.neu.edu</a>> wrote:</span><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
<br><br>Yin-So Chen wrote:<br>> Hi -<br>><br>> how can I trace a procedure defined inside a module? Below is an example:<br>><br>> > (require (lib "trace.ss"))<br>> > (require (lib "
process.ss"))<br>> > (trace system*)<br>> set!: cannot mutate module-required variable in: system*<br>><br>> I try to keep my own code modular during development, but the<br>> limitation appears to be a hindrance when trace is unable to help me
<br>> discern what's going on. Are there ways to get around this<br>> limitation? I discover this to be a design choice at<br>> <a href="http://hkn.eecs.berkeley.edu/~dyoo/plt/modules.text">http://hkn.eecs.berkeley.edu/~dyoo/plt/modules.text
</a><br>> <<a href="http://hkn.eecs.berkeley.edu/%7Edyoo/plt/modules.text">http://hkn.eecs.berkeley.edu/%7Edyoo/plt/modules.text</a>>.<br>><br>This is what I did once in lieu of not being able to mutate module
<br>variables. Its probably not the best way, someone can critique it later<br>but it seems to work. And you can always make a macro to do all this<br>stuff for you.<br><br>(module foo mzscheme<br> (provide blah)<br> (define (blah x)
<br> (add1 x))<br> )<br><br><br>(require (lib "trace.ss"))<br>(require (prefix f: foo))<br>(define blah f:blah)<br>(trace blah)<br><br>(blah 2)<br><br>$ mzscheme -f y.ss<br>Welcome to MzScheme version 360, Copyright (c) 2004-2006 PLT Scheme Inc.
<br>|(blah 2)<br>|3<br> ><br><br></blockquote></div><br><br clear="all"><br>-- <br><a href="http://www.yinsochen.com">http://www.yinsochen.com</a><br>...continuous learning...