Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add GHC 9.12 and remove 9.0, 9.2 and 9.4 #216

Merged
merged 6 commits into from
Apr 6, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 2 additions & 4 deletions .github/workflows/hello.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,10 +18,10 @@ jobs:
#- aarch64-linux
compiler-nix-name:
- ghc810
- ghc92
- ghc96
- ghc98
- ghc910
- ghc912
target-platform:
- ""
- "-static"
Expand All @@ -34,11 +34,9 @@ jobs:
- false
- true
exclude:
# Just cross compiling javascript with ghc 9.6 for now
# Just cross compiling javascript with ghc 9.6 and above
- compiler-nix-name: ghc810
target-platform: "-js"
- compiler-nix-name: ghc92
target-platform: "-js"
# Static builds not working for darwin yet
- platform: x86_64-darwin
target-platform: "-static"
Expand Down
5 changes: 2 additions & 3 deletions cross-js.nix
Original file line number Diff line number Diff line change
Expand Up @@ -4,11 +4,10 @@ let tool-version-map = (import ./tool-map.nix) self;
cabal-install = tool "cabal";
haskell-tools =
pkgs.lib.optionalAttrs (withHLS && (compiler-not-in (
# it appears we can't get HLS build with 9.8 yet.
pkgs.lib.optional (builtins.compareVersions compiler.version "9.7" >= 0) compiler-nix-name
pkgs.lib.optional (builtins.compareVersions compiler.version "9.11" >= 0) compiler-nix-name
++ pkgs.lib.optional (pkgs.stdenv.hostPlatform.isDarwin && pkgs.stdenv.hostPlatform.isAarch64) "ghc902") "Haskell Language Server")) { hls = tool "haskell-language-server"; }
// pkgs.lib.optionalAttrs (withHlint && (compiler-not-in (
pkgs.lib.optional (builtins.compareVersions compiler.version "9.8" >= 0) compiler-nix-name
pkgs.lib.optional (builtins.compareVersions compiler.version "9.11" >= 0) compiler-nix-name
++ pkgs.lib.optional (pkgs.stdenv.hostPlatform.isDarwin && pkgs.stdenv.hostPlatform.isAarch64) "ghc902") "HLint")) { hlint = tool "hlint"; };
# add a trace helper. This will trace a message about disabling a component despite requesting it, if it's not supported in that compiler.
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);
Expand Down
4 changes: 2 additions & 2 deletions cross-windows.nix
Original file line number Diff line number Diff line change
Expand Up @@ -5,10 +5,10 @@ let tool-version-map = (import ./tool-map.nix) self;
haskell-tools =
pkgs.lib.optionalAttrs (withHLS && (compiler-not-in (
# it appears we can't get HLS build with 9.8 yet.
pkgs.lib.optional (builtins.compareVersions compiler.version "9.7" >= 0) compiler-nix-name
pkgs.lib.optional (builtins.compareVersions compiler.version "9.11" >= 0) compiler-nix-name
++ pkgs.lib.optional (pkgs.stdenv.hostPlatform.isDarwin && pkgs.stdenv.hostPlatform.isAarch64) "ghc902") "Haskell Language Server")) { hls = tool "haskell-language-server"; }
// pkgs.lib.optionalAttrs (withHlint && (compiler-not-in (
pkgs.lib.optional (builtins.compareVersions compiler.version "9.8" >= 0) compiler-nix-name
pkgs.lib.optional (builtins.compareVersions compiler.version "9.11" >= 0) compiler-nix-name
++ pkgs.lib.optional (pkgs.stdenv.hostPlatform.isDarwin && pkgs.stdenv.hostPlatform.isAarch64) "ghc902") "HLint")) { hlint = tool "hlint"; };
# add a trace helper. This will trace a message about disabling a component despite requesting it, if it's not supported in that compiler.
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);
Expand Down
4 changes: 2 additions & 2 deletions dynamic.nix
Original file line number Diff line number Diff line change
Expand Up @@ -5,10 +5,10 @@ let tool-version-map = (import ./tool-map.nix) self;
cabal-install = tool "cabal";
haskell-tools =
pkgs.lib.optionalAttrs (withHLS && (compiler-not-in (
pkgs.lib.optional (builtins.compareVersions compiler.version "9.7" >= 0) compiler-nix-name
pkgs.lib.optional (builtins.compareVersions compiler.version "9.11" >= 0) compiler-nix-name
++ pkgs.lib.optional (pkgs.stdenv.hostPlatform.isDarwin && pkgs.stdenv.hostPlatform.isAarch64) "ghc902") "Haskell Language Server")) { hls = tool "haskell-language-server"; }
// pkgs.lib.optionalAttrs (withHlint && (compiler-not-in (
pkgs.lib.optional (builtins.compareVersions compiler.version "9.10" >= 0) compiler-nix-name
pkgs.lib.optional (builtins.compareVersions compiler.version "9.11" >= 0) compiler-nix-name
++ pkgs.lib.optional (pkgs.stdenv.hostPlatform.isDarwin && pkgs.stdenv.hostPlatform.isAarch64) "ghc902") "HLint")) { hlint = tool "hlint"; };
# add a trace helper. This will trace a message about disabling a component despite requesting it, if it's not supported in that compiler.
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);
Expand Down
97 changes: 66 additions & 31 deletions flake.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

6 changes: 2 additions & 4 deletions flake.nix
Original file line number Diff line number Diff line change
Expand Up @@ -89,12 +89,10 @@
# projects do (that way we can use short names)
let compilers = pkgs: pkgs.lib.genAttrs [
"ghc810"
"ghc90"
"ghc92"
"ghc94"
"ghc96"
"ghc98"
"ghc910"] (short-name: rec {
"ghc910"
"ghc912"] (short-name: rec {
inherit pkgs self toolsModule;
compiler-nix-name = pkgs.haskell-nix.resolve-compiler-name short-name;
compiler = pkgs.buildPackages.haskell-nix.compiler.${compiler-nix-name};
Expand Down
4 changes: 2 additions & 2 deletions static.nix
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,9 @@ let tool-version-map = (import ./tool-map.nix) self;
cabal-install = tool "cabal";
haskell-tools =
pkgs.lib.optionalAttrs (withHLS && (compiler-not-in (
pkgs.lib.optional (builtins.compareVersions compiler.version "9.7" >= 0) compiler-nix-name) "Haskell Language Server")) { hls = tool "haskell-language-server"; }
pkgs.lib.optional (builtins.compareVersions compiler.version "9.11" >= 0) compiler-nix-name) "Haskell Language Server")) { hls = tool "haskell-language-server"; }
// pkgs.lib.optionalAttrs (withHlint && (compiler-not-in (
pkgs.lib.optional (builtins.compareVersions compiler.version "9.8" >= 0) compiler-nix-name) "HLint")) { hlint = tool "hlint"; };
pkgs.lib.optional (builtins.compareVersions compiler.version "9.11" >= 0) compiler-nix-name) "HLint")) { hlint = tool "hlint"; };
# add a trace helper. This will trace a message about disabling a component despite requesting it, if it's not supported in that compiler.
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);

Expand Down
11 changes: 10 additions & 1 deletion tool-map.nix
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ compiler-nix-name: tool: {
# Use the github source of HLS that is tested with haskell.nix CI
src = { "ghc8107" = pkgs.haskell-nix.sources."hls-2.2";
"ghc902" = pkgs.haskell-nix.sources."hls-2.4";
}.${compiler-nix-name} or pkgs.haskell-nix.sources."hls-2.9";
}.${compiler-nix-name} or pkgs.haskell-nix.sources."hls-2.10";
# `tool` normally ignores the `cabal.project` (if there is one in the hackage source).
# We need to use the github one (since it has settings to make hls build).
cabalProject = __readFile (src + "/cabal.project");
Expand All @@ -55,5 +55,14 @@ compiler-nix-name: tool: {
# cabal = { src = { outPath = self.inputs.cabal; filterPath = { path, ... }: path; }; }
#
cabalProjectFileName = "cabal.bootstrap.project";
cabalProjectLocal = ''
index-state: hackage.haskell.org 2025-03-17T00:00:00Z
'';
};
hlint = {
cabalProjectLocal = ''
if impl(ghc ==9.8.4)
constraints: ghc-lib-parser <9.12.2
'';
};
}.${tool} or fixed-versions.${tool}.${compiler-nix-name} or {}
Loading