refactoring GHCApi.
This commit is contained in:
4
Check.hs
4
Check.hs
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user