bootInfo uses boot.
This commit is contained in:
parent
d007fa817a
commit
bb8df8cbdf
16
src/Boot.hs
16
src/Boot.hs
@ -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
|
||||
|
@ -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)
|
||||
|
@ -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
|
||||
|
Loading…
Reference in New Issue
Block a user