default.nix: expose functionality: failOnAllWarnings; add doc

M  default.nix
This commit is contained in:
Anton-Latukha 2020-06-03 20:36:42 +03:00
parent 229a95ee14
commit 0382a04436
No known key found for this signature in database
GPG key ID: 3D84C07E91802E41

View file

@ -10,6 +10,7 @@
, sdistTarball ? false , sdistTarball ? false
# Produce SDist tarball and build project from it # Produce SDist tarball and build project from it
, buildFromSdist ? true , buildFromSdist ? true
, failOnAllWarnings ? false
# 2020-06-02: NOTE: enableDeadCodeElimination = true: On GHC =< 8.8.3 macOS build falls due to https://gitlab.haskell.org/ghc/ghc/issues/17283 # 2020-06-02: NOTE: enableDeadCodeElimination = true: On GHC =< 8.8.3 macOS build falls due to https://gitlab.haskell.org/ghc/ghc/issues/17283
# Disable GHC code optimizations for faster dev loops. Enable optimizations for production use or benchmarks. # Disable GHC code optimizations for faster dev loops. Enable optimizations for production use or benchmarks.
, enableDeadCodeElimination ? false , enableDeadCodeElimination ? false
@ -133,6 +134,10 @@ let
switch = buildFromSdist; switch = buildFromSdist;
function = pkgs.haskell.lib.buildFromSdist; function = pkgs.haskell.lib.buildFromSdist;
} }
{
switch = failOnAllWarnings;
function = pkgs.haskell.lib.failOnAllWarnings;
}
]; ];
funcOnSwitchAppliesFunction = set: object: funcOnSwitchAppliesFunction = set: object: