avoid strictness problem

This commit is contained in:
Joey Hess 2019-01-22 19:37:49 -04:00
parent 016ebde0d5
commit c62d2ce5c5
No known key found for this signature in database
GPG key ID: DB12DB0FF05F8F38

View file

@ -14,6 +14,7 @@ import Prelude
import Utility.Monad
import Utility.Exception
import Utility.Misc
type Version = String
@ -55,7 +56,7 @@ getChangelogVersion = do
middle = drop 1 . init
writeVersion :: Version -> IO ()
writeVersion ver = catchMaybeIO (readFile f) >>= \case
writeVersion ver = catchMaybeIO (readFileStrict f) >>= \case
Just s | s == body -> return ()
_ -> writeFile f body
where