From aaf7596bc6ca5034b1541be94cdad91f9a61f00e Mon Sep 17 00:00:00 2001 From: Daniel Firth Date: Mon, 30 Sep 2024 08:09:41 +0000 Subject: [PATCH] Add weeder --- cabal.project | 3 +++ flake.nix | 1 + nix/hydra/shell.nix | 1 + weeder.toml | 2 ++ 4 files changed, 7 insertions(+) create mode 100644 weeder.toml diff --git a/cabal.project b/cabal.project index f1ec8b642e7..8db45489881 100644 --- a/cabal.project +++ b/cabal.project @@ -41,3 +41,6 @@ benchmarks: True -- Always show detailed output for tests test-show-details: direct + +program-options + ghc-options: -fwrite-ide-info diff --git a/flake.nix b/flake.nix index f1ffb59e8db..d032401d7b0 100644 --- a/flake.nix +++ b/flake.nix @@ -80,6 +80,7 @@ cabalProject = builtins.readFile (src + "/cabal.project"); }; hlint = pkgs.haskell-nix.tool compiler "hlint" "3.8"; + weeder = pkgs.haskell-nix.tool compiler "weeder" "2.9.0"; cardano-cli = inputs.cardano-node.packages.${system}.cardano-cli; cardano-node = inputs.cardano-node.packages.${system}.cardano-node; mithril-client-cli = inputs.mithril.packages.${system}.mithril-client-cli; diff --git a/nix/hydra/shell.nix b/nix/hydra/shell.nix index 5b71876a0fc..2468d894a6d 100644 --- a/nix/hydra/shell.nix +++ b/nix/hydra/shell.nix @@ -45,6 +45,7 @@ let pkgs.treefmt # Handy to interact with the hydra-node via websockets pkgs.websocat + pkgs.weeder pkgs.yarn pkgs.yq # Use latest jq in all shells, to avoid 1.6 bug with large integers. diff --git a/weeder.toml b/weeder.toml new file mode 100644 index 00000000000..4215e181265 --- /dev/null +++ b/weeder.toml @@ -0,0 +1,2 @@ +roots = [ "^Main.main$" ] +type-class-roots = true