summaryrefslogtreecommitdiff
path: root/src/compiler/GF/CompileInParallel.hs
diff options
context:
space:
mode:
authorhallgren <hallgren@chalmers.se>2014-11-10 16:20:01 +0000
committerhallgren <hallgren@chalmers.se>2014-11-10 16:20:01 +0000
commitc707575bd7751ac3b03371edba478e37d3488448 (patch)
tree4d16d9dabed27b5d977d3d4d84a4bb317dff4a4a /src/compiler/GF/CompileInParallel.hs
parent33571ba44f2a42502722a3b025b448efe1f0ab88 (diff)
Documentation improvements and cleanup relating to the IOE monad
Renamed appIOE to tryIOE (it is analogous to 'try' in the standard libraries). Removed unused IOE operations & documented the remaining ones. Removed/simplified superfluous uses of IOE operations.
Diffstat (limited to 'src/compiler/GF/CompileInParallel.hs')
-rw-r--r--src/compiler/GF/CompileInParallel.hs6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/compiler/GF/CompileInParallel.hs b/src/compiler/GF/CompileInParallel.hs
index 22a53a841..48e5821b0 100644
--- a/src/compiler/GF/CompileInParallel.hs
+++ b/src/compiler/GF/CompileInParallel.hs
@@ -81,11 +81,11 @@ batchCompile1 lib_dir (opts,filepaths) =
takeFileName f `elem` prelude_files
ppPath ps = "-path="<>intercalate ":" (map rel ps)
deps <- newMVar M.empty
- toLog <- newLog runIOE
+ toLog <- newLog id
term <- getTermColors
let --logStrLn = toLog . ePutStrLn
--ok :: CollectOutput IO a -> IO a
- ok (CO m) = err bad good =<< appIOE m
+ ok (CO m) = err bad good =<< tryIOE m
where
good (o,r) = do toLog o; return r
bad e = do toLog (redPutStrLn e); fail "failed"
@@ -98,7 +98,7 @@ batchCompile1 lib_dir (opts,filepaths) =
-- logStrLn $ "Finished "++show (length (modules gr'))++" modules."
return gr'
fcache <- liftIO $ newIOCache $ \ _ (imp,Hide (f,ps)) ->
- do (file,_,_) <- runIOE $ findFile gfoDir ps imp
+ do (file,_,_) <- findFile gfoDir ps imp
return (file,(f,ps))
let find f ps imp =
do (file',(f',ps')) <- liftIO $ readIOCache fcache (imp,Hide (f,ps))