Skip to content

Commit

Permalink
Fix a bug in writeFileEncoding/writeFileUTF8
Browse files Browse the repository at this point in the history
  • Loading branch information
ndmitchell committed Nov 12, 2014
1 parent c6a79c4 commit 1f9f4c9
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 1 deletion.
1 change: 1 addition & 0 deletions CHANGES.txt
@@ -1,5 +1,6 @@
Changelog for Extra

Fix a bug in writeFileEncoding/writeFileUTF8
0.7
Fix for missing case in withNumCapabilities
0.6
Expand Down
2 changes: 1 addition & 1 deletion src/System/IO/Extra.hs
Expand Up @@ -82,7 +82,7 @@ readFileBinary' file = withBinaryFile file ReadMode $ \h -> do

-- | Write a file with a particular encoding.
writeFileEncoding :: TextEncoding -> FilePath -> String -> IO ()
writeFileEncoding enc file x = withFile x WriteMode $ \h -> do
writeFileEncoding enc file x = withFile file WriteMode $ \h -> do
hSetEncoding h enc
hPutStr h x

Expand Down

0 comments on commit 1f9f4c9

Please sign in to comment.