bootInfo as API.
This commit is contained in:
parent
bb8df8cbdf
commit
186485577d
@ -13,6 +13,7 @@ module Language.Haskell.GhcMod (
|
||||
, ModuleString
|
||||
, Expression
|
||||
-- * 'IO' utilities
|
||||
, bootInfo
|
||||
, browseModule
|
||||
, checkSyntax
|
||||
, lintSyntax
|
||||
@ -28,6 +29,7 @@ module Language.Haskell.GhcMod (
|
||||
, findSymbol
|
||||
) where
|
||||
|
||||
import Language.Haskell.GhcMod.Boot
|
||||
import Language.Haskell.GhcMod.Browse
|
||||
import Language.Haskell.GhcMod.Check
|
||||
import Language.Haskell.GhcMod.Cradle
|
||||
|
@ -1,17 +1,22 @@
|
||||
module Boot where
|
||||
module Language.Haskell.GhcMod.Boot where
|
||||
|
||||
import Control.Applicative ((<$>))
|
||||
import CoreMonad (liftIO)
|
||||
import CoreMonad (liftIO, liftIO)
|
||||
import GHC (Ghc)
|
||||
import Language.Haskell.GhcMod
|
||||
import Language.Haskell.GhcMod.Ghc
|
||||
import Language.Haskell.GhcMod.Internal
|
||||
import Language.Haskell.GhcMod.Browse
|
||||
import Language.Haskell.GhcMod.Flag
|
||||
import Language.Haskell.GhcMod.GHCApi
|
||||
import Language.Haskell.GhcMod.Lang
|
||||
import Language.Haskell.GhcMod.List
|
||||
import Language.Haskell.GhcMod.Types
|
||||
|
||||
-- | Print necessary information for front-end booting.
|
||||
bootInfo :: Options -> Cradle -> IO String
|
||||
bootInfo opt cradle = withGHC' $ do
|
||||
initializeFlagsWithCradle opt cradle
|
||||
boot opt
|
||||
|
||||
-- | Print necessary information for front-end booting.
|
||||
boot :: Options -> Ghc String
|
||||
boot opt = do
|
||||
mods <- modules opt
|
@ -3,6 +3,7 @@ module Language.Haskell.GhcMod.Ghc (
|
||||
withGHC
|
||||
, withGHC'
|
||||
-- * 'Ghc' utilities
|
||||
, boot
|
||||
, browse
|
||||
, check
|
||||
, info
|
||||
@ -15,6 +16,7 @@ module Language.Haskell.GhcMod.Ghc (
|
||||
, lookupSym
|
||||
) where
|
||||
|
||||
import Language.Haskell.GhcMod.Boot
|
||||
import Language.Haskell.GhcMod.Browse
|
||||
import Language.Haskell.GhcMod.Check
|
||||
import Language.Haskell.GhcMod.Find
|
||||
|
@ -48,7 +48,8 @@ Library
|
||||
Exposed-Modules: Language.Haskell.GhcMod
|
||||
Language.Haskell.GhcMod.Ghc
|
||||
Language.Haskell.GhcMod.Internal
|
||||
Other-Modules: Language.Haskell.GhcMod.Browse
|
||||
Other-Modules: Language.Haskell.GhcMod.Boot
|
||||
Language.Haskell.GhcMod.Browse
|
||||
Language.Haskell.GhcMod.CabalApi
|
||||
Language.Haskell.GhcMod.Check
|
||||
Language.Haskell.GhcMod.Cradle
|
||||
@ -91,8 +92,7 @@ Library
|
||||
Executable ghc-mod
|
||||
Default-Language: Haskell2010
|
||||
Main-Is: GHCMod.hs
|
||||
Other-Modules: Boot
|
||||
Paths_ghc_mod
|
||||
Other-Modules: Paths_ghc_mod
|
||||
GHC-Options: -Wall
|
||||
HS-Source-Dirs: src
|
||||
Build-Depends: base >= 4.0 && < 5
|
||||
@ -104,8 +104,7 @@ Executable ghc-mod
|
||||
Executable ghc-modi
|
||||
Default-Language: Haskell2010
|
||||
Main-Is: GHCModi.hs
|
||||
Other-Modules: Boot
|
||||
Paths_ghc_mod
|
||||
Other-Modules: Paths_ghc_mod
|
||||
GHC-Options: -Wall
|
||||
HS-Source-Dirs: src
|
||||
Build-Depends: base >= 4.0 && < 5
|
||||
|
@ -17,8 +17,6 @@ import System.Environment (getArgs)
|
||||
import System.Exit (exitFailure)
|
||||
import System.IO (hPutStr, hPutStrLn, stdout, stderr, hSetEncoding, utf8)
|
||||
|
||||
import Boot
|
||||
|
||||
----------------------------------------------------------------
|
||||
|
||||
progVersion :: String
|
||||
|
@ -42,8 +42,6 @@ import System.Directory (setCurrentDirectory)
|
||||
import System.Environment (getArgs)
|
||||
import System.IO (hFlush,stdout)
|
||||
|
||||
import Boot
|
||||
|
||||
----------------------------------------------------------------
|
||||
|
||||
type Logger = IO String
|
||||
|
Loading…
Reference in New Issue
Block a user