Installation fails with "cabal.project"
- Dominant language
- Haskell
- Stars
- 1.7k
- Forks
- 750
- Avg merge
- 4d 3h
- Merged PRs (30d)
- 28
Description
**Describe the bug**
I am trying to use the `head.hackage` infrastructure to test a new branch of GHC. However, I cannot compile several of the packages due to a failing pattern match within. Cabal.
**To Reproduce**
I have the following `cabal.project` in a folder:
```yaml
optional-packages: cabal-doctest-1.0.7/
extra-packages: aeson
with-compiler: /path/to/my/ghc/_build/stage1/bin/ghc
allow-newer: all
repository head.hackage.ghc.haskell.org
url: https://ghc.gitlab.haskell.org/head.hackage/
secure: True
key-threshold: 3
root-keys:
f76d08be13e9a61a377a85e2fb63f4c5435d40f8feb3e12eb05905edb8cdea89
7541f32a4ccca4f97aea3b22f5e593ba2c0267546016b992dfadcd2fe944e55d
26021a13b401500c8eb2761ca95c61f2d625bfef951b939a8124ed12ecf07329
```
Now if I run the following command:
```
$ cabal new-install --lib aeson
...
Distribution/Client/CmdInstall.hs:(361,18)-(363,72): Non-exhaustive patterns in lambda
```
This behavior only happens for those packages whicch are mentioned in the `cabal.project` file (here, `aeson` and `cabal-doctest`).
**Expected behavior**
Cabal should not throw an exception, and if possible, should install the package.
**System informataion**
- Operating system: Mac OS X 10.14.6
- `cabal`, `ghc` versions: 3.0.0.0 (compiled using GHC 8.6.5), but using a custom branch of GHC for compiling packages
Contributor guide
Assessment
This issue has not been assessed yet.