IOError001.hs 226 Bytes
Newer Older
1 2 3 4 5 6 7

-- test for a bug in GHC <= 4.08.2: handles were being left locked after
-- being shown in an error message.
main = do
  getContents
  catch getChar (\e -> print e >> return 'x')
  catch getChar (\e -> print e >> return 'x')