summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/Trivmix.hs6
1 files changed, 4 insertions, 2 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."