Skip to content

Commit 02963c3

Browse files
committed
Fixes for hlint and hls
1 parent a5d7998 commit 02963c3

File tree

5 files changed

+14
-9
lines changed

5 files changed

+14
-9
lines changed

cross-js.nix

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4,11 +4,10 @@ let tool-version-map = (import ./tool-map.nix) self;
44
cabal-install = tool "cabal";
55
haskell-tools =
66
pkgs.lib.optionalAttrs (withHLS && (compiler-not-in (
7-
# it appears we can't get HLS build with 9.8 yet.
8-
pkgs.lib.optional (builtins.compareVersions compiler.version "9.7" >= 0) compiler-nix-name
7+
pkgs.lib.optional (builtins.compareVersions compiler.version "9.11" >= 0) compiler-nix-name
98
++ pkgs.lib.optional (pkgs.stdenv.hostPlatform.isDarwin && pkgs.stdenv.hostPlatform.isAarch64) "ghc902") "Haskell Language Server")) { hls = tool "haskell-language-server"; }
109
// pkgs.lib.optionalAttrs (withHlint && (compiler-not-in (
11-
pkgs.lib.optional (builtins.compareVersions compiler.version "9.8" >= 0) compiler-nix-name
10+
pkgs.lib.optional (builtins.compareVersions compiler.version "9.11" >= 0) compiler-nix-name
1211
++ pkgs.lib.optional (pkgs.stdenv.hostPlatform.isDarwin && pkgs.stdenv.hostPlatform.isAarch64) "ghc902") "HLint")) { hlint = tool "hlint"; };
1312
# add a trace helper. This will trace a message about disabling a component despite requesting it, if it's not supported in that compiler.
1413
compiler-not-in = compiler-list: name: (if __elem compiler-nix-name compiler-list then __trace "No ${name}. Not yet compatible with ${compiler-nix-name}" false else true);

cross-windows.nix

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,10 +5,10 @@ let tool-version-map = (import ./tool-map.nix) self;
55
haskell-tools =
66
pkgs.lib.optionalAttrs (withHLS && (compiler-not-in (
77
# it appears we can't get HLS build with 9.8 yet.
8-
pkgs.lib.optional (builtins.compareVersions compiler.version "9.7" >= 0) compiler-nix-name
8+
pkgs.lib.optional (builtins.compareVersions compiler.version "9.11" >= 0) compiler-nix-name
99
++ pkgs.lib.optional (pkgs.stdenv.hostPlatform.isDarwin && pkgs.stdenv.hostPlatform.isAarch64) "ghc902") "Haskell Language Server")) { hls = tool "haskell-language-server"; }
1010
// pkgs.lib.optionalAttrs (withHlint && (compiler-not-in (
11-
pkgs.lib.optional (builtins.compareVersions compiler.version "9.8" >= 0) compiler-nix-name
11+
pkgs.lib.optional (builtins.compareVersions compiler.version "9.11" >= 0) compiler-nix-name
1212
++ pkgs.lib.optional (pkgs.stdenv.hostPlatform.isDarwin && pkgs.stdenv.hostPlatform.isAarch64) "ghc902") "HLint")) { hlint = tool "hlint"; };
1313
# add a trace helper. This will trace a message about disabling a component despite requesting it, if it's not supported in that compiler.
1414
compiler-not-in = compiler-list: name: (if __elem compiler-nix-name compiler-list then __trace "No ${name}. Not yet compatible with ${compiler-nix-name}" false else true);

dynamic.nix

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,10 +5,10 @@ let tool-version-map = (import ./tool-map.nix) self;
55
cabal-install = tool "cabal";
66
haskell-tools =
77
pkgs.lib.optionalAttrs (withHLS && (compiler-not-in (
8-
pkgs.lib.optional (builtins.compareVersions compiler.version "9.7" >= 0) compiler-nix-name
8+
pkgs.lib.optional (builtins.compareVersions compiler.version "9.11" >= 0) compiler-nix-name
99
++ pkgs.lib.optional (pkgs.stdenv.hostPlatform.isDarwin && pkgs.stdenv.hostPlatform.isAarch64) "ghc902") "Haskell Language Server")) { hls = tool "haskell-language-server"; }
1010
// pkgs.lib.optionalAttrs (withHlint && (compiler-not-in (
11-
pkgs.lib.optional (builtins.compareVersions compiler.version "9.10" >= 0) compiler-nix-name
11+
pkgs.lib.optional (builtins.compareVersions compiler.version "9.11" >= 0) compiler-nix-name
1212
++ pkgs.lib.optional (pkgs.stdenv.hostPlatform.isDarwin && pkgs.stdenv.hostPlatform.isAarch64) "ghc902") "HLint")) { hlint = tool "hlint"; };
1313
# add a trace helper. This will trace a message about disabling a component despite requesting it, if it's not supported in that compiler.
1414
compiler-not-in = compiler-list: name: (if __elem compiler-nix-name compiler-list then __trace "No ${name}. Not yet compatible with ${compiler-nix-name}" false else true);

static.nix

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,9 +4,9 @@ let tool-version-map = (import ./tool-map.nix) self;
44
cabal-install = tool "cabal";
55
haskell-tools =
66
pkgs.lib.optionalAttrs (withHLS && (compiler-not-in (
7-
pkgs.lib.optional (builtins.compareVersions compiler.version "9.7" >= 0) compiler-nix-name) "Haskell Language Server")) { hls = tool "haskell-language-server"; }
7+
pkgs.lib.optional (builtins.compareVersions compiler.version "9.11" >= 0) compiler-nix-name) "Haskell Language Server")) { hls = tool "haskell-language-server"; }
88
// pkgs.lib.optionalAttrs (withHlint && (compiler-not-in (
9-
pkgs.lib.optional (builtins.compareVersions compiler.version "9.8" >= 0) compiler-nix-name) "HLint")) { hlint = tool "hlint"; };
9+
pkgs.lib.optional (builtins.compareVersions compiler.version "9.11" >= 0) compiler-nix-name) "HLint")) { hlint = tool "hlint"; };
1010
# add a trace helper. This will trace a message about disabling a component despite requesting it, if it's not supported in that compiler.
1111
compiler-not-in = compiler-list: name: (if __elem compiler-nix-name compiler-list then __trace "No ${name}. Not yet compatible with ${compiler-nix-name}" false else true);
1212

tool-map.nix

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -59,4 +59,10 @@ compiler-nix-name: tool: {
5959
index-state: hackage.haskell.org 2025-03-17T00:00:00Z
6060
'';
6161
};
62+
hlint = {
63+
cabalProjectLocal = ''
64+
if impl(ghc ==9.8.4)
65+
constraints: ghc-lib-parser <9.12.2
66+
'';
67+
};
6268
}.${tool} or fixed-versions.${tool}.${compiler-nix-name} or {}

0 commit comments

Comments
 (0)