1
0
forked from GitHub/gf-core

make Data.Binary.decodeFile stricter. It seems like this fixes the file locking problem on Linux

This commit is contained in:
krasimir
2009-06-23 11:56:22 +00:00
parent 8e72ff3a1c
commit 9e3131f169

View File

@@ -272,9 +272,9 @@ encodeFile f v = L.writeFile f (encode v)
decodeFile :: Binary a => FilePath -> IO a
decodeFile f = do
s <- L.readFile f
return $ runGet (do v <- get
m <- isEmpty
m `seq` return v) s
return $! runGet (do v <- get
m <- isEmpty
m `seq` return v) s
-- needs bytestring 0.9.1.x to work