cabal-install-3.12.1.0: The command-line interface for Cabal and Hackage.

Safe Haskell | None
Language | Haskell2010

Distribution.Client.Init.NonInteractive.Command

Synopsis

- genPkgDescription :: Interactive m => InitFlags -> SourcePackageDb -> m PkgDescription
- genLibTarget :: Interactive m => InitFlags -> Compiler -> InstalledPackageIndex -> CabalSpecVersion -> m LibTarget
- genExeTarget :: Interactive m => InitFlags -> Compiler -> InstalledPackageIndex -> CabalSpecVersion -> m ExeTarget
- genTestTarget :: Interactive m => InitFlags -> Compiler -> InstalledPackageIndex -> CabalSpecVersion -> m (Maybe TestTarget)
- createProject :: Interactive m => Compiler -> Verbosity -> InstalledPackageIndex -> SourcePackageDb -> InitFlags -> m ProjectSettings
- packageTypeHeuristics :: Interactive m => InitFlags -> m PackageType
- authorHeuristics :: Interactive m => InitFlags -> m String
- emailHeuristics :: Interactive m => InitFlags -> m String
- cabalVersionHeuristics :: Interactive m => InitFlags -> m CabalSpecVersion
- packageNameHeuristics :: Interactive m => SourcePackageDb -> InitFlags -> m PackageName
- versionHeuristics :: Interactive m => InitFlags -> m Version
- mainFileHeuristics :: Interactive m => InitFlags -> m HsFilePath
- testDirsHeuristics :: Interactive m => InitFlags -> m [String]
- initializeTestSuiteHeuristics :: Interactive m => InitFlags -> m Bool
- exposedModulesHeuristics :: Interactive m => InitFlags -> m (NonEmpty ModuleName)
- libOtherModulesHeuristics :: Interactive m => InitFlags -> m [ModuleName]
- exeOtherModulesHeuristics :: Interactive m => InitFlags -> m [ModuleName]
- testOtherModulesHeuristics :: Interactive m => InitFlags -> m [ModuleName]
- buildToolsHeuristics :: Interactive m => InitFlags -> FilePath -> CabalSpecVersion -> m [Dependency]
- dependenciesHeuristics :: Interactive m => InitFlags -> FilePath -> InstalledPackageIndex -> m [Dependency]
- otherExtsHeuristics :: Interactive m => InitFlags -> FilePath -> m [Extension]
- licenseHeuristics :: Interactive m => InitFlags -> m SpecLicense
- homepageHeuristics :: Interactive m => InitFlags -> m String
- synopsisHeuristics :: Interactive m => InitFlags -> m String
- categoryHeuristics :: Interactive m => InitFlags -> m String
- extraDocFileHeuristics :: Interactive m => InitFlags -> m (Maybe (Set FilePath))
- appDirsHeuristics :: Interactive m => InitFlags -> m [String]
- srcDirsHeuristics :: Interactive m => InitFlags -> m [String]
- languageHeuristics :: Interactive m => InitFlags -> Compiler -> m Language
- noCommentsHeuristics :: Interactive m => InitFlags -> m Bool
- minimalHeuristics :: Interactive m => InitFlags -> m Bool
- overwriteHeuristics :: Interactive m => InitFlags -> m Bool

# Documentation

genPkgDescription :: Interactive m => InitFlags -> SourcePackageDb -> m PkgDescription #

genLibTarget :: Interactive m => InitFlags -> Compiler -> InstalledPackageIndex -> CabalSpecVersion -> m LibTarget #

genExeTarget :: Interactive m => InitFlags -> Compiler -> InstalledPackageIndex -> CabalSpecVersion -> m ExeTarget #

genTestTarget :: Interactive m => InitFlags -> Compiler -> InstalledPackageIndex -> CabalSpecVersion -> m (Maybe TestTarget) #

createProject :: Interactive m => Compiler -> Verbosity -> InstalledPackageIndex -> SourcePackageDb -> InitFlags -> m ProjectSettings #

Main driver for interactive prompt code.

packageTypeHeuristics :: Interactive m => InitFlags -> m PackageType #

Try to guess if the project builds a library, an executable, or both.

authorHeuristics :: Interactive m => InitFlags -> m String #

The author's name. Prompt, or try to guess from an existing git repo.

emailHeuristics :: Interactive m => InitFlags -> m String #

The author's email. Prompt, or try to guess from an existing git repo.

cabalVersionHeuristics :: Interactive m => InitFlags -> m CabalSpecVersion #

Get the version of the cabal spec to use. The spec version can be specified by the InitFlags cabalVersion field. If none is specified then the default version is used.

packageNameHeuristics :: Interactive m => SourcePackageDb -> InitFlags -> m PackageName #

Get the package name: use the package directory (supplied, or the current directory by default) as a guess. It looks at the SourcePackageDb to avoid using an existing package name.

versionHeuristics :: Interactive m => InitFlags -> m Version #

Package version: use 0.1.0.0 as a last resort

mainFileHeuristics :: Interactive m => InitFlags -> m HsFilePath #

Try to guess the main file, if nothing is found, fallback to a default value.

testDirsHeuristics :: Interactive m => InitFlags -> m [String] #

initializeTestSuiteHeuristics :: Interactive m => InitFlags -> m Bool #

exposedModulesHeuristics :: Interactive m => InitFlags -> m (NonEmpty ModuleName) #

Retrieve the list of exposed modules

libOtherModulesHeuristics :: Interactive m => InitFlags -> m [ModuleName] #

Retrieve the list of other modules for Libraries, filtering them based on the last component of the module name

exeOtherModulesHeuristics :: Interactive m => InitFlags -> m [ModuleName] #

Retrieve the list of other modules for Executables, it lists everything that is a Haskell file within the application directory, excluding the main file

testOtherModulesHeuristics :: Interactive m => InitFlags -> m [ModuleName] #

Retrieve the list of other modules for Tests, it lists everything that is a Haskell file within the tests directory, excluding the main file

buildToolsHeuristics :: Interactive m => InitFlags -> FilePath -> CabalSpecVersion -> m [Dependency] #

Retrieve the list of build tools

dependenciesHeuristics :: Interactive m => InitFlags -> FilePath -> InstalledPackageIndex -> m [Dependency] #

Retrieve the list of dependencies

otherExtsHeuristics :: Interactive m => InitFlags -> FilePath -> m [Extension] #

Retrieve the list of extensions

licenseHeuristics :: Interactive m => InitFlags -> m SpecLicense #

Choose a license for the package. The license can come from Initflags (license field), if it is not present then prompt the user from a predefined list of licenses.

homepageHeuristics :: Interactive m => InitFlags -> m String #

Prompt for a homepage URL for the package.

synopsisHeuristics :: Interactive m => InitFlags -> m String #

Prompt for a project synopsis.

categoryHeuristics :: Interactive m => InitFlags -> m String #

Prompt for a package category. Note that it should be possible to do some smarter guessing here too, i.e. look at the name of the top level source directory.

extraDocFileHeuristics :: Interactive m => InitFlags -> m (Maybe (Set FilePath)) #

Try to guess extra source files.

appDirsHeuristics :: Interactive m => InitFlags -> m [String] #

Ask for the application root directory.

srcDirsHeuristics :: Interactive m => InitFlags -> m [String] #

Ask for the source (library) root directory.

languageHeuristics :: Interactive m => InitFlags -> Compiler -> m Language #

Ask for the Haskell base language of the package.

noCommentsHeuristics :: Interactive m => InitFlags -> m Bool #

Ask whether to generate explanatory comments.

minimalHeuristics :: Interactive m => InitFlags -> m Bool #

overwriteHeuristics :: Interactive m => InitFlags -> m Bool #