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

@@ -14,8 +14,8 @@ listModules :: Options -> IO String
listModules opt = convert opt . nub . sort <$> list opt
list :: Options -> IO [String]
list opt = withGHC $ do
_ <- initSession0 opt
list opt = withGHCDummyFile $ do
initializeFlags opt
getExposedModules <$> getSessionDynFlags
where
getExposedModules = map moduleNameString