<div dir="ltr">Saw this in another thread here, but the proposed solution didnt work, well at least the way I understood it.  So ..<div><br></div><div>In file db-lib.rkt  I have a definition:</div><div><br></div><blockquote style="margin:0px 0px 0px 40px;border:none;padding:0px"><div>(provide db-exec)</div><div>(define (db-exec a) ...)</div></blockquote><div><br></div><div>Then in racket</div><div><br></div><blockquote style="margin:0px 0px 0px 40px;border:none;padding:0px"><div>> (enter! "db-user.rkt")</div></blockquote><div><br></div><div>Where db-citation.rkt has</div><div><br></div><blockquote style="margin:0px 0px 0px 40px;border:none;padding:0px"><div>(require "db-lib.rkt")</div><div><br></div></blockquote>Now at the read-eval-print prompt I try<div><br></div><blockquote style="margin:0px 0px 0px 40px;border:none;padding:0px"><div>(enter! "db-citation.rkt")</div></blockquote><div><br></div><div>And when I do (trace db-exec)  I get the cannot mutate error.  (Surely this must be a racket 101 type problem.)  So I try to include the module at the current scope..<br><br></div><blockquote style="margin:0px 0px 0px 40px;border:none;padding:0px"><div><div>racket@db-citation.rkt> (require "db-lib.rkt")</div></div><div><div>racket@db-citation.rkt>     (require racket/trace)</div></div><div><div>racket@db-citation.rkt>    (trace db-exec)</div></div><div><div><br></div></div><div><div>racket@db-citation.rkt> stdin::1130: set!: cannot mutate module-required identifier in: db-exec</div></div><div> </div></blockquote><div>ok, so that doesn't work,  so I start over again.  This time after reading the thread on this list</div><div><br></div><blockquote style="margin:0px 0px 0px 40px;border:none;padding:0px"><div>From: Vincent St-Amour (stamourv at <a href="http://ccs.neu.edu">ccs.neu.edu</a>)</div><div>Date: Mon Oct 10 13:49:46 EDT 2011<br><br></div></blockquote>which concludes by saying 'put the trace in your program that should work',   so I add this to "db-citation.rkt"<br><br><blockquote style="margin:0px 0px 0px 40px;border:none;padding:0px"><div>    (require racket/trace)</div><div>    (trace db-exec)</div></blockquote><div><br></div><div>And then at the prompt I get the following:</div><div><br></div><blockquote style="margin:0 0 0 40px;border:none;padding:0px"><div><div>Welcome to Racket v5.2.1.</div></div><div><div>racket@> (enter! "db-citation.rkt")</div></div><div><div>db-citation.rkt:26:11: set!: cannot mutate module-required identifier in: db-exec</div></div></blockquote><div><br></div><div>Alright, so what is the magic incantation here that allows one to debug/trace calls in included modules?<br><br>Thanks!</div><div><br></div><div>Thomas</div></div>