Skip to content

Commit a6b6139

Browse files
authored
Merge pull request #6761 from hyperreal-gopher/patch-1
Update documentation to reflect that `cabal init` is not interactive by default in 3.0
2 parents 9714c53 + ca5b49f commit a6b6139

File tree

1 file changed

+25
-20
lines changed

1 file changed

+25
-20
lines changed

Cabal/doc/developing-packages.rst

Lines changed: 25 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,9 @@
11
Quickstart
22
==========
33

4+
.. TIP::
5+
If this is your first time using `cabal` you should check out the `Getting Started guide <getting-started.html>`__.
6+
47
Lets assume we have created a project directory and already have a
58
Haskell module or two.
69

@@ -33,38 +36,40 @@ them for us.
3336
Using "cabal init"
3437
------------------
3538

36-
The ``cabal init`` command is interactive. It asks us a number of
37-
questions starting with the package name and version.
39+
The ``cabal init --interactive`` command is interactive. If we answer
40+
"no" to using the "sensible defaults" it asks a number of questions.
3841

3942
::
4043

41-
$ cabal init
42-
Package name [default "proglet"]?
43-
Package version [default "0.1"]?
44+
$ cabal init --interactive
45+
Should I generate a simple project with sensible defaults? [default: y] n
46+
What does the package build:
47+
1) Executable
48+
2) Library
49+
3) Library and Executable
50+
Your choice?
4451
...
4552

46-
It also asks questions about various other bits of package metadata. For
47-
a package that you never intend to distribute to others, these fields
48-
can be left blank.
49-
5053
One of the important questions is whether the package contains a library
51-
or an executable. Libraries are collections of Haskell modules that can
52-
be re-used by other Haskell libraries and programs, while executables
54+
and/or an executable. Libraries are collections of Haskell modules that
55+
can be re-used by other Haskell libraries and programs, while executables
5356
are standalone programs.
5457

55-
::
56-
57-
What does the package build:
58-
1) Library
59-
2) Executable
60-
Your choice?
61-
6258
For the moment these are the only choices. For more complex packages
6359
(e.g. a library and multiple executables or test suites) the ``.cabal``
6460
file can be edited afterwards.
6561

66-
Finally, ``cabal init`` creates the initial ``proglet.cabal`` and
67-
``Setup.hs`` files, and depending on your choice of license, a
62+
After you make your selection (executable; library; or: library
63+
and executable) cabal asks us a number of questions starting with
64+
which version of the cabal specification to use, our package's name
65+
(for example, "proglet"), and our package's version.
66+
67+
It also asks questions about various other bits of package metadata. For
68+
a package that you never intend to distribute to others, these fields
69+
can be left blank.
70+
71+
Finally, ``cabal init --interactive`` creates the initial ``proglet.cabal``
72+
and ``Setup.hs`` files, and depending on your choice of license, a
6873
``LICENSE`` file as well.
6974

7075
::

0 commit comments

Comments
 (0)