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