3 Jun
2002
3 Jun
'02
11:10 p.m.
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 reid@cs.utah.edu http://www.cs.utah.edu/~reid/