Safe Haskell | None |
---|---|
Language | Haskell2010 |
Language.Haskell.Tools.Daemon.PackageDB
Description
Setting the package database to use when compiling modules. The daemon must have one single package database that cannot be changed after a package is loaded using that package database. Available package databases are the cabal global, the cabal sandbox, the stack or one that had been explicitely set by a file path.
Synopsis
- data PackageDB
- = DefaultDB
- | CabalSandboxDB
- | StackDB
- | ExplicitDB {
- packageDBPath :: [FilePath]
- decidePkgDB :: [FilePath] -> IO (Maybe PackageDB)
- packageDBLoc :: PackageDB -> FilePath -> IO [FilePath]
- detectAutogen :: FilePath -> PackageDB -> IO (Maybe FilePath)
Documentation
Possible package database configurations.
Constructors
DefaultDB | Use the global cabal package database (like when using ghc). |
CabalSandboxDB | Use the sandboxed cabal package database. |
StackDB | Use the stack package databases (local and snapshot). |
ExplicitDB | Set the package database explicitely. |
Fields
|
Instances
Eq PackageDB Source # | |
Show PackageDB Source # | |
Generic PackageDB Source # | |
FromJSON PackageDB Source # | |
Defined in Language.Haskell.Tools.Daemon.PackageDB | |
type Rep PackageDB Source # | |
Defined in Language.Haskell.Tools.Daemon.PackageDB type Rep PackageDB = D1 (MetaData "PackageDB" "Language.Haskell.Tools.Daemon.PackageDB" "haskell-tools-daemon-1.1.1.0-Eiua9vsHGthI15B7hKxUY5" False) ((C1 (MetaCons "DefaultDB" PrefixI False) (U1 :: Type -> Type) :+: C1 (MetaCons "CabalSandboxDB" PrefixI False) (U1 :: Type -> Type)) :+: (C1 (MetaCons "StackDB" PrefixI False) (U1 :: Type -> Type) :+: C1 (MetaCons "ExplicitDB" PrefixI True) (S1 (MetaSel (Just "packageDBPath") NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 [FilePath])))) |
decidePkgDB :: [FilePath] -> IO (Maybe PackageDB) Source #
Decide which type of project we are dealing with based on the package folders. Should only be invoked if the user did not select the project-type.