Unloading a dll generated by GHC doesn't free all resources
There seems to be resource leaks in load&unload of a DLL. If you put it in a loop strange thing can happen.
So one thing I notiticed is that several places (Ticker.c, IOManager.c) create threads, but I could not find the place where these threads die. How are they supposed to die shutdownHaskell() is called?