Skip to content

Commit caecf93

Browse files
authored
Use haskell-language-server 2.11 (#2387)
* Use haskell-language-server 2.11 * Use existing haddock-library and haddock-api on GHC >9.12 * Reduce number of tests
1 parent 2e3a85b commit caecf93

File tree

6 files changed

+28
-4
lines changed

6 files changed

+28
-4
lines changed

build.nix

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -57,10 +57,10 @@ in rec {
5757
inherit evalPackages;
5858
src = pkgs.haskell-nix.sources."hls-2.2";
5959
};
60-
} // pkgs.lib.optionalAttrs (ghcFromTo "9.0" "9.10.2") {
60+
} // pkgs.lib.optionalAttrs (ghcFromTo "9.0" "9.13") {
6161
"hls" = tool compiler-nix-name "haskell-language-server" {
6262
inherit evalPackages;
63-
src = pkgs.haskell-nix.sources."hls-2.10";
63+
src = pkgs.haskell-nix.sources."hls-2.11";
6464
};
6565
})
6666
);

flake.lock

Lines changed: 18 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

flake.nix

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,7 @@
2121
"hls-2.8" = { url = "github:haskell/haskell-language-server/2.8.0.0"; flake = false; };
2222
"hls-2.9" = { url = "github:haskell/haskell-language-server/2.9.0.1"; flake = false; };
2323
"hls-2.10" = { url = "github:haskell/haskell-language-server/2.10.0.0"; flake = false; };
24+
"hls-2.11" = { url = "github:haskell/haskell-language-server/2.11.0.0"; flake = false; };
2425
"hls" = { url = "github:haskell/haskell-language-server"; flake = false; };
2526
hackage = {
2627
url = "github:input-output-hk/hackage.nix";

lib/call-cabal-project-to-nix.nix

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -461,6 +461,8 @@ let
461461
cabal_file=${ghcSrc}/compiler/${name}.cabal.in
462462
elif [ -f ${ghcSrc}/libraries/${name}/${name}.cabal.in ]; then
463463
cabal_file=${ghcSrc}/libraries/${name}/${name}.cabal.in
464+
elif [ -f ${ghcSrc}/utils/haddock/${name}/${name}.cabal ]; then
465+
cabal_file=${ghcSrc}/utils/haddock/${name}/${name}.cabal
464466
fi
465467
if [[ "$cabal_file" != "" ]]; then
466468
fixed_cabal_file=$(mktemp)

overlays/haskell.nix

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1126,6 +1126,9 @@ final: prev: {
11261126
"xhtml"
11271127
] ++ final.lib.optionals (builtins.compareVersions ghc.version "9.4" > 0) [
11281128
"system-cxx-std-lib"
1129+
] ++ final.lib.optionals (builtins.compareVersions ghc.version "9.12" > 0) [
1130+
"haddock-api"
1131+
"haddock-library"
11291132
] ++ final.lib.optionals (
11301133
!final.stdenv.targetPlatform.isGhcjs
11311134
&& !final.stdenv.targetPlatform.isWindows

test/haskell-language-server/cabal.nix

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ let
33
project = haskell-nix.cabalProject' {
44
inherit compiler-nix-name evalPackages;
55
name = "haskell-language-server";
6-
src = haskell-nix.sources."hls-2.10";
6+
src = haskell-nix.sources."hls-2.11";
77
configureArgs = "--disable-benchmarks --disable-tests"; # This makes cabalProject' more like the `tool` function
88
};
99
in recurseIntoAttrs {
@@ -16,5 +16,5 @@ in recurseIntoAttrs {
1616
meta.disabled =
1717
stdenv.hostPlatform != stdenv.buildPlatform
1818
|| __compareVersions buildPackages.haskell-nix.compiler.${compiler-nix-name}.version "9.0.1" < 0
19-
|| __compareVersions buildPackages.haskell-nix.compiler.${compiler-nix-name}.version "9.10.2" >= 0;
19+
|| __compareVersions buildPackages.haskell-nix.compiler.${compiler-nix-name}.version "9.13" >= 0;
2020
}

0 commit comments

Comments
 (0)