> Alternatively, we could have an explicit operation > > runFinalizers :: IO () > > which causes finalizers to run in a non-pre-emptive or > non-concurrent system.
Of course, this solution is no use at all if your use of ffi is to pull a big mostly pure C library into Haskell. On two separate occasions, I've added interfaces to image processing libraries where pretty much every function was pure (it either generated a fresh image or returned an Int, Float or whatever). Images tend to be big (640x400x24bits is 3/4 Mbyte) so a few dozen image processing steps might quickly use up a lot of memory - and in all that time you don't go anywhere near the IO monad. -- Alastair Reid [EMAIL PROTECTED] http://www.cs.utah.edu/~reid/ _______________________________________________ FFI mailing list [EMAIL PROTECTED] http://www.haskell.org/mailman/listinfo/ffi