Skip to content

Commit

Permalink
Fix readFile001 on Windows
Browse files Browse the repository at this point in the history
  • Loading branch information
igfoo committed Apr 14, 2011
1 parent 4e5cccf commit 08b7a84
Showing 1 changed file with 3 additions and 2 deletions.
@@ -1,7 +1,8 @@
Left readFile001.out: openFile: permission denied (Permission denied)
-- !!! readFile test

import IO
import System.IO
import System.IO.Error

source = "readFile001.hs"
filename = "readFile001.out"
Expand All @@ -15,7 +16,7 @@ main = do

-- This open should fail, because the readFile hasn't been forced
-- and the file is therefore still locked.
try (openFile filename WriteMode) >>= print
tryIOError (openFile filename WriteMode) >>= print

putStrLn s

Expand Down

0 comments on commit 08b7a84

Please sign in to comment.