removing unnecessary return value.
This commit is contained in:
parent
7761691795
commit
d01cfac221
6
Cabal.hs
6
Cabal.hs
@ -23,16 +23,16 @@ import Types
|
||||
importDirs :: [String]
|
||||
importDirs = [".","..","../..","../../..","../../../..","../../../../.."]
|
||||
|
||||
initializeGHC :: Options -> FilePath -> [String] -> Bool -> Ghc (FilePath,LogReader)
|
||||
initializeGHC :: Options -> FilePath -> [String] -> Bool -> Ghc LogReader
|
||||
initializeGHC opt fileName ghcOptions logging = withCabal ||> withoutCabal
|
||||
where
|
||||
withoutCabal = do
|
||||
logReader <- initSession opt ghcOptions importDirs Nothing logging
|
||||
return (fileName,logReader)
|
||||
return logReader
|
||||
withCabal = do
|
||||
(gopts,idirs,depPkgs) <- liftIO $ fromCabal ghcOptions
|
||||
logReader <- initSession opt gopts idirs (Just depPkgs) logging
|
||||
return (fileName,logReader)
|
||||
return logReader
|
||||
|
||||
fromCabal :: [String] -> IO ([String], [FilePath], [String])
|
||||
fromCabal ghcOptions = do
|
||||
|
4
Check.hs
4
Check.hs
@ -21,8 +21,8 @@ check :: Options -> String -> IO [String]
|
||||
check opt fileName = withGHC' fileName $ checkIt `gcatch` handleErrMsg
|
||||
where
|
||||
checkIt = do
|
||||
(file,readLog) <- initializeGHC opt fileName options True
|
||||
setTargetFile file
|
||||
readLog <- initializeGHC opt fileName options True
|
||||
setTargetFile fileName
|
||||
_ <- load LoadAllTargets
|
||||
liftIO readLog
|
||||
options
|
||||
|
4
Info.hs
4
Info.hs
@ -143,8 +143,8 @@ inModuleContext opt fileName modstr action errmsg =
|
||||
withGHC (valid ||> invalid ||> return errmsg)
|
||||
where
|
||||
valid = do
|
||||
(file,_) <- initializeGHC opt fileName ["-w"] False
|
||||
setTargetFile file
|
||||
_ <- initializeGHC opt fileName ["-w"] False
|
||||
setTargetFile fileName
|
||||
_ <- load LoadAllTargets
|
||||
doif setContextFromTarget action
|
||||
invalid = do
|
||||
|
Loading…
Reference in New Issue
Block a user