Is there any way to define flags for cabal dependencies?
问题 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 before running cabal install for my project. 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? 回答1: One way to do this is to use Stack. Edit your stack.yaml to include flags: transformers-compat: transformers3: true See also the section on flags. 回答2: