ghc-options parsing of quoted strings is slightly non-obvious
Open
Cabal: parser
type: enhancement
- Dominant language
- Haskell
- Stars
- 1.7k
- Forks
- 750
- Avg merge
- 4d 3h
- Merged PRs (30d)
- 28
Description
Say, for instance, that I would like to pass `-with-rtsopts="-I0 -qg"` to `ghc`. I might try adding the following to my cabal file,
```
ghc-options: -with-rtsopts="-I0 -qg"
```
However, this would result in Cabal passing `'-with-rtsopts="-I0' '-qg"'` to `ghc` instead, resulting in a rather confusing error.
To accomplish my goal it seems I instead need to quote the entire argument,
```
ghc-options: "-with-rtsopts=-I0 -qg"
```
While I can see the rationale here, it is a bit surprising and the errors that are produced when one gets it wrong aren't so great. Is there any reason not to allow quoting anywhere in `ghc-options`?
Contributor guide
Assessment
This issue has not been assessed yet.