@@ -50,12 +50,15 @@ fillApp :: String -> String -> M.MVar Queue -> IO ()
5050fillApp modu func mqueue =
5151 go Nothing []
5252 where
53+ constSE :: x -> SomeException -> x
54+ constSE = const
55+ getTimes = handle (constSE $ return []) . mapM getModificationTime
5356 go prevError prevFiles = do
5457 toReload <-
5558 if null prevFiles
5659 then return True
5760 else do
58− times <- mapM (getModificationTime . fst) prevFiles
61+ times <- getTimes $ map fst prevFiles
5962 return $ times /= map snd prevFiles
6063 (newError, newFiles) <-
6164 if toReload
@@ -76,10 +79,8 @@ fillApp modu func mqueue =
7679 putStrLn "Interpreting success, new app loaded"
7780 E.handle onInitErr $ do
7881 swapApp app mqueue
79− files' <- forM files $ \f -> do
80− t <- getModificationTime f
81− return (f, t)
82− return (Nothing, files')
82+ times <- getTimes files
83+ return (Nothing, zip files times)
8384 onInitErr e = do
8485 putStrLn $ "Error initializing application: " ++ show e
8586 loadingApp' (Just e) mqueue