blob: 80c260e65506101975e4cf5a38230eaa6a9fc8e9 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
|
import System.IO
import System.Mem
import FinalizerExceptionHandler
main :: IO ()
main = do
setFinalizerExceptionHandler printToStderrFinalizerExceptionHandler
f <- openFile "/dev/full" WriteMode
hPutStr f "hello"
-- Ensure that the Handle's finalizer is run
performMajorGC
|