equal
deleted
inserted
replaced
50 else |
50 else |
51 return (Nothing, []) |
51 return (Nothing, []) |
52 where |
52 where |
53 loadFile :: String -> IO (Maybe CheckInfo, [B.ByteString]) |
53 loadFile :: String -> IO (Maybe CheckInfo, [B.ByteString]) |
54 loadFile fileName = E.handle (\(e :: SomeException) -> |
54 loadFile fileName = E.handle (\(e :: SomeException) -> |
55 warningM "REPLAYS" ("Problems reading " ++ fileName ++ ": " ++ show e) >> return (Nothing, [])) $ do |
55 warningM "REPLAYS" ("Problems reading " ++ fileName ++ ": " ++ show e) >> return (Just $ CheckInfo fileName [], [])) $ do |
56 (teams, params1, params2, roundMsgs) <- liftM read $ readFile fileName |
56 (teams, params1, params2, roundMsgs) <- liftM read $ readFile fileName |
57 return $ ( |
57 return $ ( |
58 Just (CheckInfo fileName teams) |
58 Just (CheckInfo fileName teams) |
59 , let d = replayToDemo teams (Map.fromList params1) (Map.fromList params2) (reverse roundMsgs) in d `deepseq` d |
59 , let d = replayToDemo teams (Map.fromList params1) (Map.fromList params2) (reverse roundMsgs) in d `deepseq` d |
60 ) |
60 ) |