Skip to content

Instantly share code, notes, and snippets.

@monadplus
Last active September 5, 2022 10:16
Show Gist options
  • Save monadplus/92b4d389587c635568e19cf33e17dc11 to your computer and use it in GitHub Desktop.
Save monadplus/92b4d389587c635568e19cf33e17dc11 to your computer and use it in GitHub Desktop.
Haskell: ghc-options

Cabal: ghc-options

  • ghc-options specified in *.cabal apply to LOCAL packages.

  • If you want your ghc-options to be applied to ALL packages (including dependencies), you need to create a top-level cabal.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:

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment