haskell / haskell/cabal

Installing a library doesn't install its dependencies

Open
#6,263 5 comments 0 reactions 0 assignees View on GitHub
cabal-install: cmd/install re: v1-vs-v2
Dominant language
Haskell
Stars
1.7k
Forks
750
Avg merge
4d 3h
Merged PRs (30d)
28

Description

**Describe the bug**
When I install (globally) a library, I don't seem to get its dependencies in my environment file.

**To Reproduce**
Steps to reproduce the behavior:

```
$ cabal v2-install --lib singletons
$ ghci
> import Language.Haskell.TH.Desugar
```

Witness an error that the requested module is in a hidden package.

**Expected behavior**
I expected to be able to access modules from libraries. It's very awkward otherwise. Running `cabal v2-install ... --only-dependencies` doesn't help.

**System informataion**
- Mac
- `cabal 3.0.0.0`
- `ghc 8.8.1`

**Additional context**
Maybe I'm misusing the new Cabal, but I don't know how to install a library's set of (transitive) dependencies in a global environment file.

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.