mirror of
https://github.com/GrammaticalFramework/gf-core.git
synced 2026-04-23 03:32:51 -06:00
make Data.Binary.decodeFile stricter. It seems like this fixes the file locking problem on Linux
This commit is contained in:
@@ -272,9 +272,9 @@ encodeFile f v = L.writeFile f (encode v)
|
|||||||
decodeFile :: Binary a => FilePath -> IO a
|
decodeFile :: Binary a => FilePath -> IO a
|
||||||
decodeFile f = do
|
decodeFile f = do
|
||||||
s <- L.readFile f
|
s <- L.readFile f
|
||||||
return $ runGet (do v <- get
|
return $! runGet (do v <- get
|
||||||
m <- isEmpty
|
m <- isEmpty
|
||||||
m `seq` return v) s
|
m `seq` return v) s
|
||||||
|
|
||||||
-- needs bytestring 0.9.1.x to work
|
-- needs bytestring 0.9.1.x to work
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user