bootInfo uses boot.

This commit is contained in:
Kazu Yamamoto 2014-04-30 10:39:39 +09:00
parent d007fa817a
commit bb8df8cbdf
3 changed files with 9 additions and 11 deletions

View File

@ -5,17 +5,15 @@ import CoreMonad (liftIO)
import GHC (Ghc)
import Language.Haskell.GhcMod
import Language.Haskell.GhcMod.Ghc
import Language.Haskell.GhcMod.Internal
boot :: Options -> Cradle -> IO String
boot opt cradle = do
mods <- listModules opt cradle
langs <- listLanguages opt
flags <- listFlags opt
pre <- concat <$> mapM (browseModule opt cradle) preBrowsedModules
return $ mods ++ langs ++ flags ++ pre
bootInfo :: Options -> Cradle -> IO String
bootInfo opt cradle = withGHC' $ do
initializeFlagsWithCradle opt cradle
boot opt
boot' :: Options -> Ghc String
boot' opt = do
boot :: Options -> Ghc String
boot opt = do
mods <- modules opt
langs <- liftIO $ listLanguages opt
flags <- liftIO $ listFlags opt

View File

@ -124,7 +124,7 @@ main = flip E.catches handlers $ do
"lint" -> nArgs 1 withFile (lintSyntax opt) cmdArg1
"root" -> rootInfo opt cradle
"doc" -> nArgs 1 $ packageDoc opt cradle cmdArg1
"boot" -> boot opt cradle
"boot" -> bootInfo opt cradle
"version" -> return progVersion
"help" -> return $ O.usageInfo usage argspec
cmd -> E.throw (NoSuchCommand cmd)

View File

@ -261,7 +261,7 @@ bootIt :: Options
-> Set FilePath
-> Ghc (String, Bool, Set FilePath)
bootIt opt set = do
ret <- boot' opt
ret <- boot opt
return (ret, True, set)
browseIt :: Options