haskell / haskell/cabal

cabal is a poet

Open
#8,189 3 comments 11 reactions 1 assignee Claimed by @mgsium View on GitHub
cabal-install: cmd/run newcomer re: error-message
Dominant language
Haskell
Stars
1.7k
Forks
750
Avg merge
4d 3h
Merged PRs (30d)
28

Description

```
cabal-testsuite$ cabal run all -- --help
Error: cabal: The run command is for running a single executable at once. The
target 'all' refers to all the packages in the project which includes the
executable 'cabal', the executable 'setup', the executable 'cabal-tests', the
executable 'hackage-benchmark', the test suite 'unit-tests', the test suite
'rpmvercmp', the test suite 'parser-tests', the test suite 'no-thunks-test',
the test suite 'hackage-tests', the test suite 'custom-setup-tests', the test
suite 'check-tests', the test suite 'cabal-benchmarks', the test suite
'unit-tests', the test suite 'mem-use-tests', the test suite 'long-tests', the
test suite 'integration-tests2', the test suite 'unit-tests' and the test
suite 'unit-tests'.
```
Beautiful!

As much as we should teach our kids to communicate in full sentences, I would like `cabal` to answer me in _tabular_ form:
```
cabal-testsuite$ cabal run all -- --help
Error: cabal: The run command is for running a single executable at once. The
target 'all' refers to all the packages in the project which includes:
- executables: cabal, setup, cabal-tests, hackage-benchmark
- test-suites:
* unit-tests
* rpmvercmp
* parser-tests
* no-thunks-test
* hackage-tests
* custom-tests
* check-tests
* cabal-benchmarks
* mem-use-tests
* long-tests
* integration-tests2
```
(Short lists on one line, long lists one-item-per-line, no duplicates.)
One could also drop the punctuation:
```
- executables: cabal setup cabal-tests hackage-benchmark
- test-suites:
unit-tests
rpmvercmp
parser-tests
no-thunks-test
hackage-tests
custom-tests
check-tests
cabal-benchmarks
mem-use-tests
long-tests
integration-tests2
```
Current pretty-printing frameworks do support separators which end up either horizontal or vertical, depending on the length of the list.

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.