stack-1.3.2: The Haskell Tool Stack

Safe Haskell | None
Language | Haskell2010

Stack.New

Description

Create new a new project directory populated with a basic working project.

Synopsis

- new :: (StackM env m, HasConfig env) => NewOpts -> Bool -> m (Path Abs Dir)
- data NewOpts = NewOpts {
  - newOptsProjectName :: PackageName
  - newOptsCreateBare :: Bool
  - newOptsTemplate :: Maybe TemplateName
  - newOptsNonceParams :: Map Text Text
  }
- defaultTemplateName :: TemplateName
- templateNameArgument :: Mod ArgumentFields TemplateName -> Parser TemplateName
- getTemplates :: StackM env m => m (Set TemplateName)
- data TemplateName
- listTemplates :: StackM env m => m ()

# Documentation

new :: (StackM env m, HasConfig env) => NewOpts -> Bool -> m (Path Abs Dir) #

Create a new project with the given options.

data NewOpts #

Options for creating a new project.

Constructors

NewOpts |
Fields newOptsProjectName :: PackageName Name of the project to create. newOptsCreateBare :: Bool Whether to create the project without a directory. newOptsTemplate :: Maybe TemplateName Name of the template to use. newOptsNonceParams :: Map Text Text Nonce parameters specified just for this invocation.

defaultTemplateName :: TemplateName #

The default template name you can use if you don't have one.

templateNameArgument :: Mod ArgumentFields TemplateName -> Parser TemplateName #

An argument which accepts a template name of the format `foo.hsfiles` or `foo`, ultimately normalized to `foo`.

getTemplates :: StackM env m => m (Set TemplateName) #

Get the set of templates.

data TemplateName #

A template name.

Instances

Eq TemplateName # |
Methods (==) :: TemplateName -> TemplateName -> Bool # (/=) :: TemplateName -> TemplateName -> Bool #
Ord TemplateName # |
Methods compare :: TemplateName -> TemplateName -> Ordering # (<) :: TemplateName -> TemplateName -> Bool # (<=) :: TemplateName -> TemplateName -> Bool # (>) :: TemplateName -> TemplateName -> Bool # (>=) :: TemplateName -> TemplateName -> Bool # max :: TemplateName -> TemplateName -> TemplateName # min :: TemplateName -> TemplateName -> TemplateName #
Show TemplateName # |
Methods showsPrec :: Int -> TemplateName -> ShowS # show :: TemplateName -> String # showList :: [TemplateName] -> ShowS #
FromJSON TemplateName # |
Methods parseJSON :: Value -> Parser TemplateName # parseJSONList :: Value -> Parser [TemplateName] #

listTemplates :: StackM env m => m () #

Display the set of templates accompanied with description if available.