haskell: introduce failOnAllWarnings

Applying `haskell.lib.failOnAllWarnings` to a Haskell package enables the
`-Wall` and `-Werror` GHC options to turn all warnings into build failures.
This commit is contained in:
Bas van Dijk
2017-09-10 13:09:52 +02:00
parent 9b8f67969e
commit b4ea459eab
2 changed files with 12 additions and 5 deletions

View File

@@ -117,7 +117,9 @@ rec {
'';
});
buildStrictly = pkg: buildFromSdist (appendConfigureFlag pkg "--ghc-option=-Wall --ghc-option=-Werror");
buildStrictly = pkg: buildFromSdist (failOnAllWarnings pkg);
failOnAllWarnings = drv: appendConfigureFlag drv "--ghc-option=-Wall --ghc-option=-Werror";
checkUnusedPackages =
{ ignoreEmptyImports ? false