Skip to content

Commit

Permalink
Upgrade to ghc 9.4.4
Browse files Browse the repository at this point in the history
  • Loading branch information
avh4 committed Apr 13, 2023
1 parent 640d5e9 commit 85c642d
Show file tree
Hide file tree
Showing 11 changed files with 65 additions and 38 deletions.
4 changes: 2 additions & 2 deletions .github/actions/haskell/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,13 +9,13 @@ runs:
name: Setup Haskell
id: setup-haskell
with:
ghc-version: 9.2.5
ghc-version: 9.4.4
- name: Verify Haskell version
shell: bash
run: |
cabal --version
ghc --version
[[ $(ghc --numeric-version) == 9.2.5 ]]
[[ $(ghc --numeric-version) == 9.4.4 ]]
file "$(which cabal)"
file "$(which ghc)"
- name: Cache ~/.cabal/store
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/Build release (lamdera-community).yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ jobs:
runner: [ self-hosted, macOS, ARM64 ]
archive-label: macOS-arm64
ghc:
version: "9.2.5"
version: "9.4.4"
build-platform: aarch64-apple-darwin

name: release-${{ matrix.build.name }}
Expand Down
4 changes: 2 additions & 2 deletions .gitpod.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,8 @@ tasks:
init: |
curl --proto '=https' --tlsv1.2 -sSf https://get-ghcup.haskell.org | BOOTSTRAP_HASKELL_NONINTERACTIVE=1 BOOTSTRAP_HASKELL_MINIMAL=1 sh
source "$GHCUP_INSTALL_BASE_PREFIX/.ghcup/env"
ghcup install ghc 9.2.5
ghcup set ghc 9.2.5
ghcup install ghc 9.4.4
ghcup set ghc 9.4.4
ghcup install cabal
cabal update
./dev/build.sh
Expand Down
2 changes: 1 addition & 1 deletion Dockerfile
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
FROM alpine:latest as build

ENV GHC_VERSION 9.2.5
ENV GHC_VERSION 9.4.4

ENV LANG C.UTF-8

Expand Down
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -305,8 +305,8 @@ git clone https://github.com/avh4/elm-format.git
cd elm-format
# initial setup
ghcup install ghc 9.2.5
ghcup set ghc 9.2.5
ghcup install ghc 9.4.4
ghcup set ghc 9.4.4
cabal install hpack
# build
Expand Down
2 changes: 1 addition & 1 deletion Shakefile/src/Shakefiles/Haskell.hs
Original file line number Diff line number Diff line change
Expand Up @@ -112,7 +112,7 @@ cabalProject name sourceFiles sourcePatterns deps testPatterns testDeps =
cabalBuildDir :: String -> Action FilePath
cabalBuildDir projectName = do
version <- readFile' ("_build/cabal" </> projectName </> "version")
return $ "dist-newstyle" </> "build" </> Shakefiles.Platform.cabalInstallOs </> "ghc-9.2.5" </> projectName ++ "-" ++ version
return $ "dist-newstyle" </> "build" </> Shakefiles.Platform.cabalInstallOs </> "ghc-9.4.4" </> projectName ++ "-" ++ version


executable :: String -> String -> String -> Rules ()
Expand Down
8 changes: 4 additions & 4 deletions Shakefile/src/Shakefiles/Haskell/Hpc.hs
Original file line number Diff line number Diff line change
Expand Up @@ -15,10 +15,10 @@ mergeTixFiles tixs out = do
rules :: String -> Rules ()
rules gitSha = do
let hpcConfig =
[ "--hpcdir=./dist-newstyle/_coverage/build/x86_64-linux/ghc-9.2.5/elm-format-0.8.7/hpc/vanilla/mix/elm-format"
, "--hpcdir=./dist-newstyle/_coverage/build/x86_64-linux/ghc-9.2.5/avh4-lib-0.0.0.1/hpc/vanilla/mix/avh4-lib-0.0.0.1"
, "--hpcdir=./dist-newstyle/_coverage/build/x86_64-linux/ghc-9.2.5/elm-format-lib-0.0.0.1/hpc/vanilla/mix/elm-format-lib-0.0.0.1"
, "--hpcdir=./dist-newstyle/_coverage/build/x86_64-linux/ghc-9.2.5/elm-format-markdown-0.0.0.1/hpc/vanilla/mix/elm-format-markdown-0.0.0.1"
[ "--hpcdir=./dist-newstyle/_coverage/build/x86_64-linux/ghc-9.4.4/elm-format-0.8.7/hpc/vanilla/mix/elm-format"
, "--hpcdir=./dist-newstyle/_coverage/build/x86_64-linux/ghc-9.4.4/avh4-lib-0.0.0.1/hpc/vanilla/mix/avh4-lib-0.0.0.1"
, "--hpcdir=./dist-newstyle/_coverage/build/x86_64-linux/ghc-9.4.4/elm-format-lib-0.0.0.1/hpc/vanilla/mix/elm-format-lib-0.0.0.1"
, "--hpcdir=./dist-newstyle/_coverage/build/x86_64-linux/ghc-9.4.4/elm-format-markdown-0.0.0.1/hpc/vanilla/mix/elm-format-markdown-0.0.0.1"
, "--srcdir=."
, "--srcdir=avh4-lib"
, "--srcdir=elm-format-lib"
Expand Down
2 changes: 1 addition & 1 deletion cabal.project
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ packages:
./elm-format-test-lib,
./
./Shakefile
with-compiler: ghc-9.2.5
with-compiler: ghc-9.4.4

constraints:
-- ansi-terminal-0.11.1 has issues with Win32-2.10.* (which is packaged with ghc-9.0)
Expand Down
35 changes: 17 additions & 18 deletions cabal.project.freeze
Original file line number Diff line number Diff line change
Expand Up @@ -12,36 +12,35 @@ constraints: any.Glob ==0.10.2,
any.array ==0.5.4.0,
any.assoc ==1.0.2,
any.attoparsec ==0.14.4,
any.base ==4.16.4.0,
any.base ==4.17.0.0,
any.base-compat ==0.12.2,
any.base-compat-batteries ==0.12.2,
any.base-orphans ==0.8.8.2,
any.bifunctors ==5.5.15,
any.bimap ==0.5.0,
any.binary ==0.8.9.0,
any.binary ==0.8.9.1,
any.bytestring ==0.11.3.1,
any.call-stack ==0.4.0,
any.clock ==0.8.3,
any.colour ==2.3.6,
any.comonad ==5.0.8,
any.concurrent-split ==0.0.1.1,
any.conduit ==1.3.4.3,
any.containers ==0.6.5.1,
any.containers ==0.6.6,
any.contravariant ==1.5.5,
any.data-array-byte ==0.1.0.1,
any.data-fix ==0.3.2,
any.deepseq ==1.4.6.1,
any.directory ==1.3.6.2,
any.deepseq ==1.4.8.0,
any.directory ==1.3.7.1,
any.distributive ==0.6.2.1,
any.dlist ==1.0,
any.exceptions ==0.10.4,
any.exceptions ==0.10.5,
any.extra ==1.7.12,
any.filepath ==1.4.2.2,
any.filepattern ==0.1.3,
any.generically ==0.1.1,
any.ghc-bignum ==1.2,
any.ghc-boot-th ==9.2.5,
any.ghc-prim ==0.8.0,
any.ghc-bignum ==1.3,
any.ghc-boot-th ==9.4.4,
any.ghc-prim ==0.9.0,
any.hashable ==1.4.2.0,
any.haskell-lexer ==1.1.1,
any.heaps ==0.4,
Expand All @@ -64,7 +63,7 @@ constraints: any.Glob ==0.10.2,
optparse-applicative +process,
any.pooled-io ==0.0.2.3,
any.pretty ==1.1.3.6,
any.primitive ==0.7.3.0,
any.primitive ==0.7.4.0,
any.process ==1.6.16.0,
any.quickcheck-io ==0.2.0,
any.random ==1.2.1.1,
Expand All @@ -79,8 +78,9 @@ constraints: any.Glob ==0.10.2,
any.smallcheck ==1.2.1,
any.split ==0.2.3.5,
any.splitmix ==0.1.0.4,
any.stm ==2.5.0.2,
any.stm ==2.5.1.0,
any.strict ==0.4.0.1,
any.system-cxx-std-lib ==1.0,
any.tagged ==0.8.6.1,
any.tasty ==1.4.3,
tasty +unix,
Expand All @@ -89,17 +89,17 @@ constraints: any.Glob ==0.10.2,
any.tasty-hunit ==0.10.0.3,
any.tasty-quickcheck ==0.10.2,
any.tasty-smallcheck ==0.8.2,
any.template-haskell ==2.18.0.0,
any.template-haskell ==2.19.0.0,
any.text ==2.0.2,
any.text-short ==0.1.5,
any.tf-random ==0.5,
any.th-abstraction ==0.4.5.0,
any.th-abstraction ==0.5.0.0,
any.these ==1.1.1.1,
any.time ==1.11.1.1,
any.time ==1.12.2,
any.time-compat ==1.9.6.1,
any.transformers ==0.5.6.2,
any.transformers-compat ==0.7.2,
any.unix ==2.7.2.2,
any.unix ==2.7.3,
any.unliftio-core ==0.2.1.0,
any.unordered-containers ==0.2.19.1,
any.unsafe ==0.0,
Expand All @@ -109,6 +109,5 @@ constraints: any.Glob ==0.10.2,
any.vector ==0.12.3.1,
any.vector-algorithms ==0.8.0.4,
any.witherable ==0.4.2,
any.yaml ==0.11.11.0,
yaml +no-examples +no-exe
any.yaml ==0.11.11.0
index-state: hackage.haskell.org 2023-04-12T20:00:51Z
11 changes: 5 additions & 6 deletions default.nix
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
{ sources ? import ./nix/sources.nix, compiler ? "ghc925" }:
{ sources ? import ./nix/sources.nix, compiler ? "ghc944" }:

let
gitignore = import sources."gitignore.nix" { };
Expand Down Expand Up @@ -51,9 +51,8 @@ let
avh4-lib = mkPkg "avh4-lib" ./avh4-lib { inherit text; };
elm-format-lib =
mkPkg "elm-format-lib" ./elm-format-lib { inherit aeson text; };
elm-format-test-lib = mkPkg "elm-format-test-lib" ./elm-format-test-lib {
inherit text;
};
elm-format-test-lib =
mkPkg "elm-format-test-lib" ./elm-format-test-lib { inherit text; };
elm-format-markdown =
mkPkg "elm-format-markdown" ./elm-format-markdown { inherit text; };
};
Expand Down Expand Up @@ -81,9 +80,9 @@ let
# This is the haskell package set that includes elm-format and all its dependencies
haskellPackages = mkHaskellPackages pkgs;

# This is a haskell package set for the same ghc version that does not have any package overries
# This is a haskell package set for the same ghc version that does not have our project package overries
# (Because our override aren't compatible with haskell-language-server, etc)
haskellTools = pkgs.haskell.packages."${compiler}";
haskellTools = import ./nix/tools.nix { inherit sources compiler; };
in {
elm-format = haskellPackages.elm-format;
dist = {
Expand Down
29 changes: 29 additions & 0 deletions nix/tools.nix
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
{ sources ? import ./sources.nix, compiler }:

let
haskellToolsOverrides = pkgs: self: super:
with pkgs.haskell.lib; rec {
# ghcid-0.8.8
ghcid = self.callCabal2nix "ghcid" (builtins.fetchGit {
url = "https://github.com/ndmitchell/ghcid.git";
rev = "c38cdc97cd9470bb9025ea334d88d451bf1d8400";
}) { fsnotify = self.fsnotify_0_4_1_0; };

# string-qq's tests depend on text < 1.3
string-qq = overrideCabal super.string-qq (orig: { doCheck = false; });
};

haskellToolsPkgs = import sources.nixpkgs {
config = {
packageOverrides = pkgs: rec {
haskell = pkgs.haskell // {
packages = pkgs.haskell.packages // {
tools = pkgs.haskell.packages."${compiler}".override {
overrides = haskellToolsOverrides pkgs;
};
};
};
};
};
};
in haskellToolsPkgs.haskell.packages.tools

0 comments on commit 85c642d

Please sign in to comment.