Is there any way to define flags for cabal dependencies?

后端 未结 5 1456
天命终不由人
天命终不由人 2020-12-30 20:11

I recently ran into a Cabal issue that I only managed to solve by manually installing transformers-compat with the -f transformers3 flag in my cabal sandbox be

5条回答
  •  予麋鹿
    予麋鹿 (楼主)
    2020-12-30 21:13

    Newer versions of Cabal let you specify constraints in your cabal.project.local or cabal.project file. For example:

    constraints: hmatrix +openblas
    

    Is there any way to indicate in my application's .cabal file that I depend on a library so that it is built with the specific build flag?

    No, but in your case this is not actually a problem in the solver and is rather and uninformative error (caused by someone's less than judicious uses of flags).

提交回复
热议问题