<div class="gmail_quote">On Fri, Nov 6, 2009 at 1:03 AM, Simon Marlow <span dir="ltr">&lt;<a href="mailto:marlowsd@gmail.com">marlowsd@gmail.com</a>&gt;</span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;">
<div><div></div><div class="h5">One reliable way to do this would be to dynamically load the code to be tested using the GHC API, and call this between each evaluation:</div></div>
<br>
foreign import ccall &quot;revertCAFs&quot; revertCAFs  :: IO ()<br>
<br>
(note revertCAFs only works on CAFs in dynamically-loaded object code, not interpreted or statically linked CAFs).<br>
</blockquote><div><br></div><div>Good to know, thanks. I ended up doing this, which is simpler and seems to work (at least for now):</div><div><br></div><div><a href="http://hpaste.org/fastcgi/hpaste.fcgi/view?id=11887">http://hpaste.org/fastcgi/hpaste.fcgi/view?id=11887</a> </div>
</div>