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?