avoid strictness problem
This commit is contained in:
parent
016ebde0d5
commit
c62d2ce5c5
1 changed files with 2 additions and 1 deletions
|
@ -14,6 +14,7 @@ import Prelude
|
||||||
|
|
||||||
import Utility.Monad
|
import Utility.Monad
|
||||||
import Utility.Exception
|
import Utility.Exception
|
||||||
|
import Utility.Misc
|
||||||
|
|
||||||
type Version = String
|
type Version = String
|
||||||
|
|
||||||
|
@ -55,7 +56,7 @@ getChangelogVersion = do
|
||||||
middle = drop 1 . init
|
middle = drop 1 . init
|
||||||
|
|
||||||
writeVersion :: Version -> IO ()
|
writeVersion :: Version -> IO ()
|
||||||
writeVersion ver = catchMaybeIO (readFile f) >>= \case
|
writeVersion ver = catchMaybeIO (readFileStrict f) >>= \case
|
||||||
Just s | s == body -> return ()
|
Just s | s == body -> return ()
|
||||||
_ -> writeFile f body
|
_ -> writeFile f body
|
||||||
where
|
where
|
||||||
|
|
Loading…
Reference in a new issue