| for the purpose of benchmarking I require some way of forcing a garbage
| collection *within* Haskell. After an intensive study of ghc's user
| guide I found something like:
|
| performGC :: PrimIO ()
| performGC = _ccall_GC_ PerformGC
|
| However, I tried in vain to make things work. [Could not figure out
| which compiler flags to set, which files to imports/includes ...] Can
| anybody help?
You don't say which version of GHC you were using, nor what errors you
encountered, so it's a bit hard to help.
You certainly need -fglasgow-exts.
You will probably need to use primIOtoIO to promote PrimIO to IO.
It's in one of the glaExts libraries; which one depends on which version of
GHC. Apart from that, I think you *should* be ok.
Simon