| Safe Haskell | None |
|---|---|
| Language | Haskell2010 |
IdeSession.Config
- data SessionConfig = SessionConfig {
- configDir :: FilePath
- configLocalWorkingDir :: Maybe FilePath
- configExtraPathDirs :: [FilePath]
- configInProcess :: InProcess
- configGenerateModInfo :: Bool
- configPackageDBStack :: PackageDBStack
- configLicenseExc :: [String]
- configLicenseFixed :: [(String, (Maybe License, Maybe FilePath, Maybe String))]
- configLog :: String -> IO ()
- configDeleteTempFiles :: Bool
- configIdeBackendServer :: (ProgramSearchPath, FilePath)
- configIdeBackendExeCabal :: (ProgramSearchPath, FilePath)
- type InProcess = Bool
- type ProgramSearchPath = [ProgramSearchPathEntry]
- data ProgramSearchPathEntry :: *
- sessionConfigFromEnv :: IO SessionConfig
- defaultSessionConfig :: SessionConfig
Documentation
data SessionConfig Source
Configuration parameters for a session. These remain the same throughout the whole session's lifetime.
Constructors
| SessionConfig | |
Fields
| |
type ProgramSearchPath = [ProgramSearchPathEntry]
A search path to use when locating executables. This is analogous
to the unix $PATH or win32 %PATH% but with the ability to use
the system default method for finding executables (findExecutable which
on unix is simply looking on the $PATH but on win32 is a bit more
complicated).
The default to use is [ProgSearchPathDefault] but you can add extra dirs
either before, after or instead of the default, e.g. here we add an extra
dir to search after the usual ones.
['ProgramSearchPathDefault', 'ProgramSearchPathDir' dir]
data ProgramSearchPathEntry :: *
Constructors
| ProgramSearchPathDir FilePath | A specific dir |
| ProgramSearchPathDefault | The system default |
defaultSessionConfig :: SessionConfig Source
Default session configuration. Most users will probably instead
want localSessionConfigFromEnv.
Use this instead of creating your own SessionConfig to be robust against extensions of SessionConfig.
defaultSessionConfig = SessionConfig {
configDir = "."
, configLocalWorkingDir = Nothing
, configExtraPathDirs = []
, configInProcess = False
, configGenerateModInfo = True
, configPackageDBStack = [GlobalPackageDB, UserPackageDB]
-- ghc-prim, integer-gmp, etc., all have their own licenses specified
-- in their .cabal files.
, configLicenseExc = ["rts"]
, configLicenseFixed = [
("bin-package-db", (Just BSD3, Nothing, Nothing))
, ("ghc", (Just BSD3, Just "../LICENSE", Just "The GHC Team"))
, ("ghc-prim", (Just BSD3, Just "LICENSE", Nothing))
, ("integer-gmp", (Just BSD3, Just "LICENSE", Nothing))
]
, configLog = const $ return ()
, configDeleteTempFiles = True
, configIdeBackendServer = (defaultProgramSearchPath,"ide-backend-server")
, configIdeBackendExeCabal = (defaultProgramSearchPath,"ide-backend-exe-cabal")
}