Rework GhcModT monad stack

This commit is contained in:
Daniel Gröber
2014-07-22 19:45:48 +02:00
parent f95f7f89ce
commit f311efd90c
7 changed files with 96 additions and 85 deletions

View File

@@ -98,7 +98,11 @@ main = E.handle cmdHandler $
setCurrentDirectory rootdir
mvar <- liftIO newEmptyMVar
void $ forkIO $ setupDB mvar
runGhcModT opt $ loop S.empty mvar
(res, _) <- runGhcModT opt $ loop S.empty mvar
case res of
Right () -> return ()
Left e -> error $ show e
where
-- this is just in case.
-- If an error is caught here, it is a bug of GhcMod library.