haskell / haskell/cabal

Add `cabal packages`

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

Description

I would like to propose that cabal learns about `packages` or `new-packages`, as a wrapper around `ghc-pkg`. The motivation here, is that one needs to use only a single command, and not need to know about `ghc-pkg`.

I'd like to see:
```
cabal packages [--global|--local]
```

where
```
cabal packages --global
```
would be
```
ghc-pkg list --package-db=$HOME/.cabal/store/ghc-VERSION/package.db
```
and
```
cabal packages --local
```
would be
```
ghc-pkg list --package-db=dist-newstyle/packagedb
```

I'm not sure if no flag should be permitted, and which of both scenarios it would be, or if it should list global AND local.

---
Slightly unrelated, but why do we have `package.db` for global and `packagedb` for local?

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.