mirror of
https://github.com/GrammaticalFramework/gf-core.git
synced 2026-04-23 19:42:50 -06:00
bugfix: Use openBinaryFile in Data.Binary.decodeFile. It makes difference only on Windows
This commit is contained in:
@@ -271,7 +271,7 @@ encodeFile f v = L.writeFile f (encode v)
|
|||||||
-- or otherwise finalise the resource.
|
-- or otherwise finalise the resource.
|
||||||
--
|
--
|
||||||
decodeFile :: Binary a => FilePath -> IO a
|
decodeFile :: Binary a => FilePath -> IO a
|
||||||
decodeFile f = bracket (openFile f ReadMode) hClose $ \h -> do
|
decodeFile f = bracket (openBinaryFile f ReadMode) hClose $ \h -> do
|
||||||
s <- L.hGetContents h
|
s <- L.hGetContents h
|
||||||
evaluate $ runGet (do v <- get
|
evaluate $ runGet (do v <- get
|
||||||
m <- isEmpty
|
m <- isEmpty
|
||||||
|
|||||||
Reference in New Issue
Block a user