refactoring GHCApi.

This commit is contained in:
Kazu Yamamoto
2013-03-04 13:41:56 +09:00
parent 3089d36071
commit 13bb6cb599
6 changed files with 43 additions and 32 deletions

View File

@@ -17,10 +17,10 @@ checkSyntax opt cradle file = unlines <$> check opt cradle file
----------------------------------------------------------------
check :: Options -> Cradle -> String -> IO [String]
check opt cradle fileName = withGHC' fileName $ checkIt `gcatch` handleErrMsg
check opt cradle fileName = withGHC fileName $ checkIt `gcatch` handleErrMsg
where
checkIt = do
readLog <- initializeGHC opt cradle fileName options True
readLog <- initializeFlagsWithCradle opt cradle fileName options True
setTargetFile fileName
_ <- load LoadAllTargets
liftIO readLog