Safe Haskell | Safe-Inferred |
---|---|
Language | Haskell2010 |
Synopsis
- getPackageDir :: Interactive m => InitFlags -> m FilePath
- getSimpleProject :: Interactive m => InitFlags -> m Bool -> m Bool
- getMinimal :: Interactive m => InitFlags -> m Bool
- getCabalVersion :: Interactive m => InitFlags -> m CabalSpecVersion -> m CabalSpecVersion
- getCabalVersionNoPrompt :: InitFlags -> CabalSpecVersion
- getPackageName :: Interactive m => InitFlags -> m PackageName -> m PackageName
- getVersion :: Interactive m => InitFlags -> m Version -> m Version
- getLicense :: Interactive m => InitFlags -> m SpecLicense -> m SpecLicense
- getAuthor :: Interactive m => InitFlags -> m String -> m String
- getEmail :: Interactive m => InitFlags -> m String -> m String
- getHomepage :: Interactive m => InitFlags -> m String -> m String
- getSynopsis :: Interactive m => InitFlags -> m String -> m String
- getCategory :: Interactive m => InitFlags -> m String -> m String
- getExtraSrcFiles :: Interactive m => InitFlags -> m (Set String)
- getExtraDocFiles :: Interactive m => InitFlags -> m (Maybe (Set String))
- getPackageType :: Interactive m => InitFlags -> m PackageType -> m PackageType
- getMainFile :: Interactive m => InitFlags -> m HsFilePath -> m HsFilePath
- getInitializeTestSuite :: Interactive m => InitFlags -> m Bool -> m Bool
- getTestDirs :: Interactive m => InitFlags -> m [String] -> m [String]
- getLanguage :: Interactive m => InitFlags -> m Language -> m Language
- getNoComments :: Interactive m => InitFlags -> m Bool -> m Bool
- getAppDirs :: Interactive m => InitFlags -> m [String] -> m [String]
- getSrcDirs :: Interactive m => InitFlags -> m [String] -> m [String]
- getExposedModules :: Interactive m => InitFlags -> m (NonEmpty ModuleName)
- getBuildTools :: Interactive m => InitFlags -> m [Dependency]
- getDependencies :: Interactive m => InitFlags -> m [Dependency] -> m [Dependency]
- getOtherExts :: Interactive m => InitFlags -> m [Extension]
- getOverwrite :: Interactive m => InitFlags -> m Bool
- getOtherModules :: Interactive m => InitFlags -> m [ModuleName]
- simpleProjectPrompt :: Interactive m => InitFlags -> m Bool
- initializeTestSuitePrompt :: Interactive m => InitFlags -> m Bool
- packageTypePrompt :: Interactive m => InitFlags -> m PackageType
- testMainPrompt :: Interactive m => m HsFilePath
- dependenciesPrompt :: Interactive m => InstalledPackageIndex -> InitFlags -> m [Dependency]
Flag extractors
getPackageDir :: Interactive m => InitFlags -> m FilePath Source #
getSimpleProject :: Interactive m => InitFlags -> m Bool -> m Bool Source #
Ask if a simple project with sensible defaults should be created.
getMinimal :: Interactive m => InitFlags -> m Bool Source #
Extract minimal cabal file flag (implies nocomments)
getCabalVersion :: Interactive m => InitFlags -> m CabalSpecVersion -> m CabalSpecVersion Source #
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 user is prompted to pick from a list of supported versions (see code below).
getPackageName :: Interactive m => InitFlags -> m PackageName -> m PackageName Source #
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.
getVersion :: Interactive m => InitFlags -> m Version -> m Version Source #
Package version: use 0.1.0.0 as a last resort, but try prompting the user if possible.
getLicense :: Interactive m => InitFlags -> m SpecLicense -> m SpecLicense Source #
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.
getAuthor :: Interactive m => InitFlags -> m String -> m String Source #
The author's name. Prompt, or try to guess from an existing darcs repo.
getEmail :: Interactive m => InitFlags -> m String -> m String Source #
The author's email. Prompt, or try to guess from an existing darcs repo.
getHomepage :: Interactive m => InitFlags -> m String -> m String Source #
Prompt for a homepage URL for the package.
getSynopsis :: Interactive m => InitFlags -> m String -> m String Source #
Prompt for a project synopsis.
getCategory :: Interactive m => InitFlags -> m String -> m String Source #
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.
getExtraSrcFiles :: Interactive m => InitFlags -> m (Set String) Source #
Try to guess extra source files (don't prompt the user).
getExtraDocFiles :: Interactive m => InitFlags -> m (Maybe (Set String)) Source #
Try to guess extra source files (don't prompt the user).
getPackageType :: Interactive m => InitFlags -> m PackageType -> m PackageType Source #
Ask whether the project builds a library or executable.
getMainFile :: Interactive m => InitFlags -> m HsFilePath -> m HsFilePath Source #
getInitializeTestSuite :: Interactive m => InitFlags -> m Bool -> m Bool Source #
getTestDirs :: Interactive m => InitFlags -> m [String] -> m [String] Source #
getLanguage :: Interactive m => InitFlags -> m Language -> m Language Source #
Ask for the Haskell base language of the package.
getNoComments :: Interactive m => InitFlags -> m Bool -> m Bool Source #
Ask whether to generate explanatory comments.
getAppDirs :: Interactive m => InitFlags -> m [String] -> m [String] Source #
Ask for the application root directory.
getSrcDirs :: Interactive m => InitFlags -> m [String] -> m [String] Source #
Ask for the source (library) root directory.
getExposedModules :: Interactive m => InitFlags -> m (NonEmpty ModuleName) Source #
Retrieve the list of exposed modules
getBuildTools :: Interactive m => InitFlags -> m [Dependency] Source #
Retrieve the list of build tools
getDependencies :: Interactive m => InitFlags -> m [Dependency] -> m [Dependency] Source #
Retrieve the list of dependencies
getOtherExts :: Interactive m => InitFlags -> m [Extension] Source #
Retrieve the list of extensions
getOverwrite :: Interactive m => InitFlags -> m Bool Source #
Tell whether to overwrite files on write
getOtherModules :: Interactive m => InitFlags -> m [ModuleName] Source #
Retrieve the list of other modules
Shared prompts
simpleProjectPrompt :: Interactive m => InitFlags -> m Bool Source #
initializeTestSuitePrompt :: Interactive m => InitFlags -> m Bool Source #
packageTypePrompt :: Interactive m => InitFlags -> m PackageType Source #
testMainPrompt :: Interactive m => m HsFilePath Source #
dependenciesPrompt :: Interactive m => InstalledPackageIndex -> InitFlags -> m [Dependency] Source #