Skip to content

Instantly share code, notes, and snippets.

@jkachmar
Created October 18, 2018 21:16
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save jkachmar/a8150a427e7e0ff51f56cd65d25b0374 to your computer and use it in GitHub Desktop.
Save jkachmar/a8150a427e7e0ff51f56cd65d25b0374 to your computer and use it in GitHub Desktop.
Useful GHC flags
# NOTE:
# For details on warnings: https://downloads.haskell.org/~ghc/master/users-guide/using-warnings.html
#
# This list taken from https://medium.com/mercury-bank/enable-all-the-warnings-a0517bc081c3
ghc-options:
- -fwarn-tabs # Warn on tabs (spaces are better)
- -Weverything # Enable all warnings with -Weverything, then
# disable the ones we don’t care about
- -Wno-missing-exported-signatures # Turns off the more strict -Wmissing-signatures.
# See https://ghc.haskell.org/trac/ghc/ticket/14794#ticket
- -Wno-missing-import-lists # Requires explicit imports of _every_ function
# (e.g. ‘$’); too strict
- -Wno-missed-specialisations # When GHC can’t specialize a polymorphic
# function. No big deal and requires fixing
# underlying libraries to solve.
- -Wno-all-missed-specialisations # See missed-specialisations
- -Wno-unsafe # Don’t use Safe Haskell warnings
- -Wno-safe # Don’t use Safe Haskell warnings
- -Wno-missing-local-signatures # Warning for polymorphic local bindings; nothing
# wrong with those.
- -Wno-monomorphism-restriction # Don’t warn if the monomorphism restriction is used
- -Wno-unused-do-bind # Allow one-line do blocks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment