haskell-tools-daemon-1.0.0.4: Background process for Haskell-tools that editors can connect to.

Safe HaskellNone
LanguageHaskell2010

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

Documentation

data PackageDB Source #

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 # 

Associated Types

type Rep PackageDB :: * -> * #

FromJSON PackageDB Source # 
type Rep PackageDB Source # 
type Rep PackageDB = D1 * (MetaData "PackageDB" "Language.Haskell.Tools.Daemon.PackageDB" "haskell-tools-daemon-1.0.0.4-5xRPvdYipy5J23vtgQpZOi" False) ((:+:) * ((:+:) * (C1 * (MetaCons "DefaultDB" PrefixI False) (U1 *)) (C1 * (MetaCons "CabalSandboxDB" PrefixI False) (U1 *))) ((:+:) * (C1 * (MetaCons "StackDB" PrefixI False) (U1 *)) (C1 * (MetaCons "ExplicitDB" PrefixI True) (S1 * (MetaSel (Just Symbol "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.

packageDBLoc :: PackageDB -> FilePath -> IO [FilePath] Source #

Finds the location of the package database based on the configuration.

detectAutogen :: FilePath -> PackageDB -> IO (Maybe FilePath) Source #

Gets the (probable) location of autogen folder depending on which type of build we are using.