getConfig runs "cabal configure" first if setup-config is invalid.
This commit is contained in:
@@ -48,34 +48,21 @@ module Language.Haskell.GhcMod.Internal (
|
||||
, runAnyOne
|
||||
-- * World
|
||||
, World
|
||||
, getWorld
|
||||
, isChanged
|
||||
, getCurrentWorld
|
||||
, isWorldChanged
|
||||
) where
|
||||
|
||||
import GHC.Paths (libdir)
|
||||
import GHC (getSessionDynFlags)
|
||||
|
||||
import Language.Haskell.GhcMod.CabalApi
|
||||
import Language.Haskell.GhcMod.CabalConfig
|
||||
import Language.Haskell.GhcMod.DynFlags
|
||||
import Language.Haskell.GhcMod.GHCChoice
|
||||
import Language.Haskell.GhcMod.Logger
|
||||
import Language.Haskell.GhcMod.Monad
|
||||
import Language.Haskell.GhcMod.Target
|
||||
import Language.Haskell.GhcMod.Types
|
||||
import Language.Haskell.GhcMod.World
|
||||
|
||||
-- | Obtaining the directory for ghc system libraries.
|
||||
ghcLibDir :: FilePath
|
||||
ghcLibDir = libdir
|
||||
|
||||
getWorld :: IOish m => GhcModT m World
|
||||
getWorld = do
|
||||
crdl <- cradle
|
||||
dflags <- getSessionDynFlags
|
||||
liftIO $ getCurrentWorld crdl dflags
|
||||
|
||||
isChanged :: IOish m => World -> GhcModT m Bool
|
||||
isChanged world = do
|
||||
crdl <- cradle
|
||||
dflags <- getSessionDynFlags
|
||||
liftIO $ isWorldChanged world crdl dflags
|
||||
|
||||
Reference in New Issue
Block a user