Skip to content

Commit b040899

Browse files
authored
Add GHC 9.12 and remove 9.0, 9.2 and 9.4 (#216)
* Add GHC 9.12 and remove 9.0, 9.2 and 9.4 * Fix building cabal with GHC 9.12 * Update comment to trigger build * nix flake update Should bring in ghc 9.6.7 * Use HLS 2.10 * Fixes for hlint and hls
1 parent d316c03 commit b040899

File tree

8 files changed

+88
-49
lines changed

8 files changed

+88
-49
lines changed

.github/workflows/hello.yml

+2-4
Original file line numberDiff line numberDiff line change
@@ -18,10 +18,10 @@ jobs:
1818
#- aarch64-linux
1919
compiler-nix-name:
2020
- ghc810
21-
- ghc92
2221
- ghc96
2322
- ghc98
2423
- ghc910
24+
- ghc912
2525
target-platform:
2626
- ""
2727
- "-static"
@@ -34,11 +34,9 @@ jobs:
3434
- false
3535
- true
3636
exclude:
37-
# Just cross compiling javascript with ghc 9.6 for now
37+
# Just cross compiling javascript with ghc 9.6 and above
3838
- compiler-nix-name: ghc810
3939
target-platform: "-js"
40-
- compiler-nix-name: ghc92
41-
target-platform: "-js"
4240
# Static builds not working for darwin yet
4341
- platform: x86_64-darwin
4442
target-platform: "-static"

cross-js.nix

+2-3
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

+2-2
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

+2-2
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);

flake.lock

+66-31
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

flake.nix

+2-4
Original file line numberDiff line numberDiff line change
@@ -89,12 +89,10 @@
8989
# projects do (that way we can use short names)
9090
let compilers = pkgs: pkgs.lib.genAttrs [
9191
"ghc810"
92-
"ghc90"
93-
"ghc92"
94-
"ghc94"
9592
"ghc96"
9693
"ghc98"
97-
"ghc910"] (short-name: rec {
94+
"ghc910"
95+
"ghc912"] (short-name: rec {
9896
inherit pkgs self toolsModule;
9997
compiler-nix-name = pkgs.haskell-nix.resolve-compiler-name short-name;
10098
compiler = pkgs.buildPackages.haskell-nix.compiler.${compiler-nix-name};

static.nix

+2-2
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

+10-1
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@ compiler-nix-name: tool: {
3737
# Use the github source of HLS that is tested with haskell.nix CI
3838
src = { "ghc8107" = pkgs.haskell-nix.sources."hls-2.2";
3939
"ghc902" = pkgs.haskell-nix.sources."hls-2.4";
40-
}.${compiler-nix-name} or pkgs.haskell-nix.sources."hls-2.9";
40+
}.${compiler-nix-name} or pkgs.haskell-nix.sources."hls-2.10";
4141
# `tool` normally ignores the `cabal.project` (if there is one in the hackage source).
4242
# We need to use the github one (since it has settings to make hls build).
4343
cabalProject = __readFile (src + "/cabal.project");
@@ -55,5 +55,14 @@ compiler-nix-name: tool: {
5555
# cabal = { src = { outPath = self.inputs.cabal; filterPath = { path, ... }: path; }; }
5656
#
5757
cabalProjectFileName = "cabal.bootstrap.project";
58+
cabalProjectLocal = ''
59+
index-state: hackage.haskell.org 2025-03-17T00:00:00Z
60+
'';
61+
};
62+
hlint = {
63+
cabalProjectLocal = ''
64+
if impl(ghc ==9.8.4)
65+
constraints: ghc-lib-parser <9.12.2
66+
'';
5867
};
5968
}.${tool} or fixed-versions.${tool}.${compiler-nix-name} or {}

0 commit comments

Comments
 (0)