haskell / haskell/cabal

How to cabal init library, executable and test suite?

Open
#8,658 2 comments 0 reactions 0 assignees View on GitHub
cabal-install: cmd/init type: enhancement
Dominant language
Haskell
Stars
1.7k
Forks
750
Avg merge
4d 3h
Merged PRs (30d)
28

Description

How do I use `cabal init` to build a package that has a library, executable and test suite? As posed, this reads like a multichoice question and answer. The list delimiters around `[default: Executable]` suggest that too.

```
$ cabal init
What does the package build:
1) Library
* 2) Executable
3) Library and Executable
4) Test suite
Your choice? [default: Executable] [3,4]
[3,4] is not a valid choice. Please choose a number from 1 to 4.
```
I don't need help answering this question but as a first time `cabal init` user but long time `cabal` user I thought I should show just how much this prompt and response tripped me up.

Contributor guide

Open the contributing guide

Research direction

The issue names no source file or test. Start by reproducing the `cabal init` prompt for a package with a library, executable, and test suite; done means the prompt accepts or clearly guides this combination without rejecting the selection.

Written by the indexing model from the issue text.

Assessment

Tech stack
haskell
Domain
cli, developer-experience
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
45/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.