removing depanal.
This commit is contained in:
parent
196450af9f
commit
998a43ce24
@ -184,9 +184,10 @@ fOptions = [option | (option,_,_) <- fFlags]
|
|||||||
----------------------------------------------------------------
|
----------------------------------------------------------------
|
||||||
----------------------------------------------------------------
|
----------------------------------------------------------------
|
||||||
|
|
||||||
setCtx :: FilePath -> [ModSummary] -> Ghc ModSummary
|
setCtx :: FilePath -> Ghc ModSummary
|
||||||
#if __GLASGOW_HASKELL__ >= 704
|
#if __GLASGOW_HASKELL__ >= 704
|
||||||
setCtx file mss = do
|
setCtx file = do
|
||||||
|
mss <- getModuleGraph
|
||||||
#if __GLASGOW_HASKELL__ >= 706
|
#if __GLASGOW_HASKELL__ >= 706
|
||||||
let modName = IIModule . moduleName . ms_mod
|
let modName = IIModule . moduleName . ms_mod
|
||||||
#else
|
#else
|
||||||
@ -197,7 +198,8 @@ setCtx file mss = do
|
|||||||
let [ms] = filter (\m -> ml_hs_file (ms_location m) == Just file) mss
|
let [ms] = filter (\m -> ml_hs_file (ms_location m) == Just file) mss
|
||||||
return ms
|
return ms
|
||||||
#else
|
#else
|
||||||
setCtx file mss = do
|
setCtx file = do
|
||||||
|
mss <- getModuleGraph
|
||||||
top <- map ms_mod <$> filterM isTop mss
|
top <- map ms_mod <$> filterM isTop mss
|
||||||
setContext top []
|
setContext top []
|
||||||
let [ms] = filter (\m -> ml_hs_file (ms_location m) == Just file) mss
|
let [ms] = filter (\m -> ml_hs_file (ms_location m) == Just file) mss
|
||||||
|
@ -140,6 +140,6 @@ inModuleContext opt cradle file action errmsg = ghandle handler $ do
|
|||||||
void $ initializeFlagsWithCradle opt cradle noWaringOptions False
|
void $ initializeFlagsWithCradle opt cradle noWaringOptions False
|
||||||
setTargetFiles [file]
|
setTargetFiles [file]
|
||||||
void $ G.load LoadAllTargets
|
void $ G.load LoadAllTargets
|
||||||
G.depanal [] False >>= Gap.setCtx file >>= action
|
Gap.setCtx file >>= action
|
||||||
where
|
where
|
||||||
handler (SomeException _) = return errmsg
|
handler (SomeException _) = return errmsg
|
||||||
|
Loading…
Reference in New Issue
Block a user