简体   繁体   中英

How to specify cabal options for an external dependency in package.yaml?

I would like to use an external package from Hackage , which exposes additional features after being compiled with some flags. Using cabal, I must compile this way: "cabal install -fserver -fc-runtime" . How can I specify this flags in the package.yaml ? I tried to use extra-deps and ghc-options , but it doesn't seem to work. I'm not sure if to use them is appropriate at all.

For now, I have this error:

"Error while parsing $.ghc-options - expected String, encountered Object."

You probably want:

flags:
  package-name:
    server: true
    c-runtime: true

Here is the related section of documentation: https://docs.haskellstack.org/en/stable/yaml_configuration/#flags

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM