summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGregor Kleen <gkleen@yggdrasil.li>2015-06-09 23:41:57 +0200
committerGregor Kleen <gkleen@yggdrasil.li>2015-06-09 23:41:57 +0200
commit4f9f222bc91f4bcd505cb584cbcc874c86b529c8 (patch)
tree6c6555f2dbf6086f2a02411cd7cadd0d9f92247d
parente68fae39b23ef87d354cb82a57243297ee82ea5c (diff)
downloadtrivmix-4f9f222bc91f4bcd505cb584cbcc874c86b529c8.tar
trivmix-4f9f222bc91f4bcd505cb584cbcc874c86b529c8.tar.gz
trivmix-4f9f222bc91f4bcd505cb584cbcc874c86b529c8.tar.bz2
trivmix-4f9f222bc91f4bcd505cb584cbcc874c86b529c8.tar.xz
trivmix-4f9f222bc91f4bcd505cb584cbcc874c86b529c8.zip
Now only looping until fixpoint
-rw-r--r--src/Trivmix.hs6
-rw-r--r--trivmix.cabal2
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
4name: trivmix 4name: trivmix
5version: 2.2.4 5version: 2.2.5
6-- synopsis: 6-- synopsis:
7-- description: 7-- description:
8license: PublicDomain 8license: PublicDomain