On Fri, Nov 6, 2009 at 1:03 AM, Simon Marlow <marlowsd@gmail.com> wrote:
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:

foreign import ccall "revertCAFs" revertCAFs  :: IO ()

(note revertCAFs only works on CAFs in dynamically-loaded object code, not interpreted or statically linked CAFs).

Good to know, thanks. I ended up doing this, which is simpler and seems to work (at least for now):

http://hpaste.org/fastcgi/hpaste.fcgi/view?id=11887