81b69c40ec045980cfb27f2c2bc9ca561167480d
[ghc.git] / testsuite / tests / lib / IO / openFile003.hs
1 import System.IO
2 import System.IO.Error
3
4 -- !!! Open a directory (should fail)
5
6 main = do
7 r <- tryIOError (openFile "." ReadMode)
8 print r
9 r <- tryIOError (openFile "." WriteMode)
10 print r
11 r <- tryIOError (openFile "." AppendMode)
12 print r
13 r <- tryIOError (openFile "." ReadWriteMode)
14 print r