mirror of
https://github.com/GrammaticalFramework/gf-core.git
synced 2026-04-22 03:09:33 -06:00
type IOE a = IO a
IOE used to be a monad with extra error handling built on top of the IO monad, But the IO monad already supports error handling, so this construction was a superfluous. The new 'instance ErrorMonad IOE' is defined to preserve the previous error handling behaviour, i.e. the function 'handle' only catches errors thrown with 'raise' (or 'fail') and not other errors in the IO monad.
This commit is contained in:
@@ -79,7 +79,7 @@ batchCompile1 lib_dir (opts,filepaths) =
|
||||
deps <- newMVar M.empty
|
||||
toLog <- newLog runIOE
|
||||
let --logStrLn = toLog . ePutStrLn
|
||||
ok :: CollectOutput IOE a -> IO a
|
||||
--ok :: CollectOutput IO a -> IO a
|
||||
ok (CO m) = err bad good =<< appIOE m
|
||||
where
|
||||
good (o,r) = do toLog o; return r
|
||||
|
||||
Reference in New Issue
Block a user