Moving commands to Ghc monad

This commit is contained in:
mvoidex
2013-05-19 01:16:37 +04:00
parent bac4bbbcf3
commit f2f3b120af
7 changed files with 42 additions and 34 deletions

View File

@@ -1,4 +1,4 @@
module Language.Haskell.GhcMod.List (listModules) where
module Language.Haskell.GhcMod.List (listModules, list) where
import Control.Applicative
import Data.List
@@ -10,11 +10,11 @@ import UniqFM
----------------------------------------------------------------
listModules :: Options -> IO String
listModules :: Options -> Ghc String
listModules opt = convert opt . nub . sort <$> list opt
list :: Options -> IO [String]
list opt = withGHCDummyFile $ do
list :: Options -> Ghc [String]
list opt = do
initializeFlags opt
getExposedModules <$> getSessionDynFlags
where