Skip to content

Commit

Permalink
Merge pull request #6368 from commercialhaskell/fix6363
Browse files Browse the repository at this point in the history
Fix #6363 Improve docs on package/project names
mpilgrem authored Dec 9, 2023
2 parents 9544d81 + a4d7952 commit 1ba03ec
Showing 1 changed file with 19 additions and 0 deletions.
19 changes: 19 additions & 0 deletions doc/new_command.md
Original file line number Diff line number Diff line change
@@ -9,10 +9,29 @@ stack new PACKAGE_NAME [--bare] [TEMPLATE_NAME] [-p|--param KEY:VALUE] [DIR(S)]

`stack new` creates a new Stack project for a package using a project template.

A package name acceptable to Cabal comprises an alphanumeric 'word'; or two or
more such words, with the words separated by a dash character (`-`). A word
cannot be comprised only of the characters `0` to `9`. An alphanumerical
character is one in one of the Unicode categories Lu (Letter, uppercase),
Ll (Letter, lowercase), Lt (Letter, titlecase), Lm (Letter, modifier),
Lo (Letter, other), Nd (Number, decimal digit), Nl (Number, letter), and
No (Number, other).

!!! note

In the case of Hackage and acceptable package names, an alphanumerical
character is limited to one of `A` to `Z`, `a` to `z`, and `0` to `9`.

The project is created in a new directory named after the package, unless the
`--bare` flag is passed, in which case the project is created in the current
directory.

!!! note

The name of a project is not constrained to be an acceptable package name. A
single-package project can be renamed to differ from the name of its
package.

The `--param <key>:<value>` option specifies a key-value pair to populate a key
in a template. The option can be specified multiple times.

0 comments on commit 1ba03ec

Please sign in to comment.