removing depanal.

This commit is contained in:
Kazu Yamamoto 2014-04-11 12:56:06 +09:00
parent 196450af9f
commit 998a43ce24
2 changed files with 6 additions and 4 deletions

View File

@ -184,9 +184,10 @@ fOptions = [option | (option,_,_) <- fFlags]
----------------------------------------------------------------
----------------------------------------------------------------
setCtx :: FilePath -> [ModSummary] -> Ghc ModSummary
setCtx :: FilePath -> Ghc ModSummary
#if __GLASGOW_HASKELL__ >= 704
setCtx file mss = do
setCtx file = do
mss <- getModuleGraph
#if __GLASGOW_HASKELL__ >= 706
let modName = IIModule . moduleName . ms_mod
#else
@ -197,7 +198,8 @@ setCtx file mss = do
let [ms] = filter (\m -> ml_hs_file (ms_location m) == Just file) mss
return ms
#else
setCtx file mss = do
setCtx file = do
mss <- getModuleGraph
top <- map ms_mod <$> filterM isTop mss
setContext top []
let [ms] = filter (\m -> ml_hs_file (ms_location m) == Just file) mss

View File

@ -140,6 +140,6 @@ inModuleContext opt cradle file action errmsg = ghandle handler $ do
void $ initializeFlagsWithCradle opt cradle noWaringOptions False
setTargetFiles [file]
void $ G.load LoadAllTargets
G.depanal [] False >>= Gap.setCtx file >>= action
Gap.setCtx file >>= action
where
handler (SomeException _) = return errmsg