cabal-install-3.10.1.0: The command-line interface for Cabal and Hackage.
Copyright(c) Brent Yorgey 2009
LicenseBSD-like
Maintainercabal-devel@haskell.org
Stabilityprovisional
Portabilityportable
Safe HaskellSafe-Inferred
LanguageHaskell2010

Distribution.Client.Init.Interactive.Command

Description

Implementation of the 'cabal init' command, which creates an initial .cabal file for a project.

Synopsis

Commands

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

Main driver for interactive prompt code.

Target generation

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

Extract flags relevant to a package description and interactively generate a PkgDescription object for creation. If the user specifies the generation of a simple package, then a simple target with defaults is generated.

genLibTarget :: Interactive m => InitFlags -> InstalledPackageIndex -> m LibTarget Source #

Extract flags relevant to a library target and interactively generate a LibTarget object for creation. If the user specifies the generation of a simple package, then a simple target with defaults is generated.

genExeTarget :: Interactive m => InitFlags -> InstalledPackageIndex -> m ExeTarget Source #

Extract flags relevant to a executable target and interactively generate a ExeTarget object for creation. If the user specifies the generation of a simple package, then a simple target with defaults is generated.

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

Extract flags relevant to a test target and interactively generate a TestTarget object for creation. If the user specifies the generation of a simple package, then a simple target with defaults is generated.

Note: this workflow is only enabled if the user answers affirmatively when prompted, or if the user passes in the flag to enable test suites at command line.

Prompts

appDirsPrompt :: Interactive m => InitFlags -> m [String] Source #

Ask for the application root directory.

srcDirsPrompt :: Interactive m => InitFlags -> m [String] Source #

Ask for the source (library) root directory.