diff options
-rw-r--r-- | src/Trivmix.hs | 6 | ||||
-rw-r--r-- | trivmix.cabal | 2 |
2 files changed, 5 insertions, 3 deletions
diff --git a/src/Trivmix.hs b/src/Trivmix.hs index 69fcea2..425de4a 100644 --- a/src/Trivmix.hs +++ b/src/Trivmix.hs | |||
@@ -194,8 +194,10 @@ readLevel levelChan current file = catch action handler | |||
194 | where | 194 | where |
195 | action = do | 195 | action = do |
196 | level <- readFile file >>= readIO . stripSpace | 196 | level <- readFile file >>= readIO . stripSpace |
197 | writeChan levelChan level | 197 | oldLevel <- readMVar current |
198 | hPutStrLn stderr $ "Detected new level: " ++ (show level) | 198 | when (oldLevel /= level) $ do |
199 | writeChan levelChan level | ||
200 | hPutStrLn stderr $ "Detected new level: " ++ (show level) | ||
199 | handler e = if isUserError e | 201 | handler e = if isUserError e |
200 | then do | 202 | then do |
201 | hPutStrLn stderr $ "Could not parse new level from ‘" ++ file ++ "’ - overwriting." | 203 | hPutStrLn stderr $ "Could not parse new level from ‘" ++ file ++ "’ - overwriting." |
diff --git a/trivmix.cabal b/trivmix.cabal index 1005508..2dede74 100644 --- a/trivmix.cabal +++ b/trivmix.cabal | |||
@@ -2,7 +2,7 @@ | |||
2 | -- documentation, see http://haskell.org/cabal/users-guide/ | 2 | -- documentation, see http://haskell.org/cabal/users-guide/ |
3 | 3 | ||
4 | name: trivmix | 4 | name: trivmix |
5 | version: 2.2.4 | 5 | version: 2.2.5 |
6 | -- synopsis: | 6 | -- synopsis: |
7 | -- description: | 7 | -- description: |
8 | license: PublicDomain | 8 | license: PublicDomain |