`ghc-options` order is incorrect when combining multiple configuration files
- Dominant language
- Haskell
- Stars
- 1.7k
- Forks
- 750
- Avg merge
- 4d 3h
- Merged PRs (30d)
- 28
Description
**Describe the bug**
`ghc-options` order is incorrect when cabal combines multiple configuration files. In my case, I'm unable to override `-Werror` with `-Wwarn`.
1. In `cabal.project` I have `ghc-options: -Wall`: https://github.com/input-output-hk/cardano-node/blob/41ad5d14106218e398c6814c2e2c2149c9208603/cabal.project#L46
1. In my `cabal.project.local` I have:
```
program-options
ghc-options: -fobject-code -freverse-errors -Wwarn
```
**To Reproduce**
Steps to reproduce the behavior:
```
cabal v2-build cardano-cli -v3 | grep Wwarn
```
the output:
```
[..] Paths_cardano_cli -Wall -Wcompat -Wincomplete-record-updates -Wincomplete-uni-patterns -Wpartial-fields -Wredundant-constraints -Wunused-packages -hide-all-packages -fobject-code -freverse-errors -Wwarn -Werror
```
**Expected behavior**
`-Wwarn` is at the end of `ghc-options`
**System information**
Archlinux
````
cabal-install version 3.10.1.0
compiled using version 3.10.1.0 of the Cabal library
ghc --version
The Glorious Glasgow Haskell Compilation System, version 8.10.7
````
Contributor guide
Assessment
This issue has not been assessed yet.