Skip to content

Commit

Permalink
Add ghc810 ghc92 ghc94 ghc96, to select latest
Browse files Browse the repository at this point in the history
Fixes #1968
  • Loading branch information
hamishmack committed May 30, 2023
1 parent f94ebdf commit 5b3ef40
Show file tree
Hide file tree
Showing 6 changed files with 16 additions and 7 deletions.
2 changes: 1 addition & 1 deletion docs/tutorials/development/default.nix
Expand Up @@ -26,5 +26,5 @@ in pkgs.haskell-nix.project {
src = ./.;
};
# Specify the GHC version to use.
compiler-nix-name = "ghc928"; # Not required for `stack.yaml` based projects.
compiler-nix-name = "ghc92"; # Not required for `stack.yaml` based projects.
}
2 changes: 1 addition & 1 deletion docs/tutorials/getting-started-flakes/flake.nix
Expand Up @@ -12,7 +12,7 @@
helloProject =
final.haskell-nix.project' {
src = ./.;
compiler-nix-name = "ghc928";
compiler-nix-name = "ghc92";
# This is used by `nix develop .` to open a shell for use with
# `cabal`, `hlint` and `haskell-language-server`
shell.tools = {
Expand Down
2 changes: 1 addition & 1 deletion docs/tutorials/getting-started/default.nix
Expand Up @@ -26,5 +26,5 @@ in pkgs.haskell-nix.project {
src = ./.;
};
# Specify the GHC version to use.
compiler-nix-name = "ghc928"; # Not required for `stack.yaml` based projects.
compiler-nix-name = "ghc92"; # Not required for `stack.yaml` based projects.
}
2 changes: 1 addition & 1 deletion hix/init/nix/hix.nix
@@ -1,6 +1,6 @@
{pkgs, ...}: {
# name = "project-name";
compiler-nix-name = "ghc8107"; # Version of GHC to use
compiler-nix-name = "ghc92"; # Version of GHC to use

# Cross compilation support:
# crossPlatforms = p: pkgs.lib.optionals pkgs.stdenv.hostPlatform.isx86_64 ([
Expand Down
9 changes: 9 additions & 0 deletions modules/cabal-project.nix
Expand Up @@ -14,6 +14,15 @@ in {
compiler-nix-name = mkOption {
type = str;
description = "The name of the ghc compiler to use eg. \"ghc884\"";
# Map short version names to the latest GHC version.
# TODO: perhaps combine this with the `latestVer` mapping in `overlays/boostrap.nix`.
apply = v: {
ghc810 = "ghc8107";
ghc90 = "ghc902";
ghc92 = "ghc928";
ghc94 = "ghc945";
ghc96 = "ghc962";
}.${v} or v;
};
compilerSelection = mkOption {
type = unspecified;
Expand Down
6 changes: 3 additions & 3 deletions overlays/bootstrap.nix
Expand Up @@ -15,9 +15,9 @@ let
"8.8" = "8.8.4";
"8.10" = "8.10.7";
"9.0" = "9.0.2";
"9.2" = "9.2.7";
"9.4" = "9.4.4";
"9.6" = "9.6.1";
"9.2" = "9.2.8";
"9.4" = "9.4.5";
"9.6" = "9.6.2";
};
traceWarnOld = v: x:
let
Expand Down

0 comments on commit 5b3ef40

Please sign in to comment.