Consider the following cabal file:
name: foo
version: 0.1.0.0
build-type: Simple
cabal-version: >= 1.10
executable foo
main-is: Main.hs
build-depends: base
default-language: Haskell2010
ghc-options: -threaded -O2 -rtsopts "-with-rtsopts=-N -T"
Using hpack-convert, I end up with:
name: foo
version: '0.1.0.0'
license: UnspecifiedLicense
ghc-options:
- -threaded
- -O2
- -rtsopts
- -with-rtsopts=-N -T
dependencies:
- base
executables:
foo:
main: Main.hs
Which results in the following in the generated cabal file:
ghc-options: -threaded -O2 -rtsopts -with-rtsopts=-N -T
Unfortunately, this does not build:
ghc: unrecognised flag: -T
did you mean one of:
-F
-v
-j
I can work around this by putting the following in my package.yaml instead of the list of options:
ghc-options: -threaded -O2 -rtsopts "-with-rtsopts=-N -T"
However, it would be nice to keep the list approach, and have hpack detect when there's a space in an option and automatically wrap it in quotes.
Consider the following cabal file:
Using
hpack-convert, I end up with:Which results in the following in the generated cabal file:
Unfortunately, this does not build:
I can work around this by putting the following in my package.yaml instead of the list of options:
However, it would be nice to keep the list approach, and have
hpackdetect when there's a space in an option and automatically wrap it in quotes.