-
ghc-optionsspecified in*.cabalapply to LOCAL packages. -
If you want your
ghc-optionsto be applied to ALL packages (including dependencies), you need to create a top-levelcabal.project:packages: . package * ghc-options: -O2
For this reason, it is important to tweak your ghc-options on a library. For example, check if -O1 or -O2 makes sense.
Source: