From 9e3131f169d65034c67c19bf8549c099a3bbdddd Mon Sep 17 00:00:00 2001 From: krasimir Date: Tue, 23 Jun 2009 11:56:22 +0000 Subject: [PATCH] make Data.Binary.decodeFile stricter. It seems like this fixes the file locking problem on Linux --- src/Data/Binary.hs | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/Data/Binary.hs b/src/Data/Binary.hs index 7398e6b84..310e73956 100644 --- a/src/Data/Binary.hs +++ b/src/Data/Binary.hs @@ -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