Ralf Hinze writes:
> 
> 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?
> 

Try (Foreign.performGC :: PrimIO ()), see the 2.03 docs for more
(in the Foreign interface section). I've removed the doc section
where I think you got the above from, it was wrong and misleading
(another victim of bitrot).

--Sigbjorn

Reply via email to