creatur 5.9.8 → 5.9.8.1
raw patch · 2 files changed
+9/−9 lines, 2 filesPVP ok
version bump matches the API change (PVP)
API changes (from Hackage documentation)
Files
- creatur.cabal +2/−2
- src/ALife/Creatur/Task.hs +7/−7
creatur.cabal view
@@ -1,5 +1,5 @@ Name: creatur-Version: 5.9.8+Version: 5.9.8.1 Stability: experimental Synopsis: Framework for artificial life experiments. Description: A software framework for automating experiments@@ -36,7 +36,7 @@ source-repository this type: git location: https://github.com/mhwombat/creatur.git- tag: 5.9.8+ tag: 5.9.8.1 library GHC-Options: -Wall -fno-warn-orphans
src/ALife/Creatur/Task.hs view
@@ -41,7 +41,7 @@ import Control.Conditional (whenM) import Control.Exception (SomeException) import Control.Monad (when)-import qualified Control.Monad.Catch as C+import Control.Monad.Catch (catchAll) import Control.Monad.State (StateT, execStateT, evalStateT) import Control.Monad.Trans.Class (lift) import Data.Serialize (Serialize)@@ -80,9 +80,7 @@ as <- lineup when (not . null $ as) $ do let a = head as- C.onException- (withAgent agentProgram a)- (writeToLog "Continuing after exception")+ catchAll (withAgent agentProgram a) reportException markDone a atEndOfRound endRoundProgram @@ -103,11 +101,13 @@ endRoundProgram = do atStartOfRound startRoundProgram as <- lineup- C.onException- (withAgents agentsProgram as)- (writeToLog "Continuing after exception")+ catchAll (withAgents agentsProgram as) reportException markDone (head as) atEndOfRound endRoundProgram++reportException :: Universe u => SomeException -> StateT u IO ()+reportException e =+ writeToLog $ "Unhandled exception: " ++ show e checkPopSize :: Universe u => (Int, Int) -> StateT u IO () checkPopSize (minAgents, maxAgents) = do