Skip to content

Commit

Permalink
chore: upgrade to GHC 9.10.1 (#1274)
Browse files Browse the repository at this point in the history
  • Loading branch information
dhess authored Jul 18, 2024
2 parents e7be104 + 226069b commit 1388baf
Show file tree
Hide file tree
Showing 9 changed files with 57 additions and 46 deletions.
20 changes: 9 additions & 11 deletions cabal.project
Original file line number Diff line number Diff line change
Expand Up @@ -30,17 +30,7 @@ haddock-quickjump: True
haddock-hyperlink-source: True
haddock-internal: True

allow-newer:
, hedgehog-classes:hedgehog
, hedgehog-classes:pretty-show
, hedgehog:pretty-show
, logging-effect:base
, refined:base
, refined:deepseq
, refined:template-haskell
, refined:aeson
, these-skinny:base
, selda:bytestring
allow-newer: all

package *
ghc-options: -fwrite-ide-info
Expand All @@ -58,6 +48,14 @@ if arch(wasm32)
package tasty
flags: -unix

-- Protolude upstream doesn't support GHC 9.10, and appears to
-- be dormant.
source-repository-package
type: git
location: https://github.com/tomjaguarpaw/protolude
tag: 57ffd726d9685a862df8c9773f3eb09de2b89594
--sha256: 1z9z887s4f1wv0pv3njyd8h8zgr2ha89jyvaxz3k5k3rk6h2g1cp

-- We need a newer version of Selda than what's been released to
-- Hackage, plus some GHC 9.6 fixes from a community fork.
source-repository-package
Expand Down
2 changes: 1 addition & 1 deletion docs/haskell-style-guide.md
Original file line number Diff line number Diff line change
Expand Up @@ -100,7 +100,7 @@ import Foreword
* We can't make promises on backward compatibility with GHC releases older than the one we're currently using to develop the project, but we won't break compatibility arbitrarily.
* We will make a best-effort attempt to test all supported GHC versions in CI.
* As a general rule, we would like to avoid CPP-style conditional compilation, except as a last resort.
* We expect the 1.0 release of the project to have a minimum requirement of at least [GHC `9.6.1`](https://www.haskell.org/ghc/download_ghc_9_6_1.html), as we want to take advantage of that version's support for [JavaScript](https://ghc.gitlab.haskell.org/ghc/doc/users_guide/javascript.html) and [WebAssembly](https://ghc.gitlab.haskell.org/ghc/doc/users_guide/wasm.html?highlight=wasm) targets.
* We expect the 1.0 release of the project to have a minimum requirement of at least [GHC `9.10.1`](https://www.haskell.org/ghc/download_ghc_9_6_1.html), as we want to take advantage of that version's support for [JavaScript](https://ghc.gitlab.haskell.org/ghc/doc/users_guide/javascript.html) and [WebAssembly](https://ghc.gitlab.haskell.org/ghc/doc/users_guide/wasm.html?highlight=wasm) targets.
* We do not plan to support Haskell implementations other than GHC.

## Spelling & grammar
Expand Down
24 changes: 12 additions & 12 deletions flake.lock

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

47 changes: 30 additions & 17 deletions flake.nix
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@
in
builtins.trace "Nix Primer version is ${v}" "git-${v}";

ghcVersion = "ghc982";
ghcVersion = "ghc9101";

# We must keep the weeder version in sync with the version of
# GHC we're using.
Expand All @@ -62,7 +62,7 @@
inputs.self.overlays.default
];

# cabal-fmt needs an override for GHC 9.8.1.
# cabal-fmt needs an override for GHC > 9.8.1.
cabal-fmt-override = {
version = "latest";
cabalProject = ''
Expand Down Expand Up @@ -299,30 +299,40 @@
];

haskellNixTools = pkgs.haskell-nix.tools ghcVersion {
hlint = "latest";
# Disabled for GHC 9.10.
# https://github.com/ndmitchell/hlint/pull/1594
#hlint = "latest";
fourmolu = fourmoluVersion;
cabal-fmt = cabal-fmt-override;

# Disabled for GHC 9.10.
# https://github.com/input-output-hk/haskell.nix/issues/2205
#cabal-fmt = cabal-fmt-override;
};
in
{
projectRootFile = "flake.nix";

programs.hlint = {
enable = true;
package = haskellNixTools.hlint;
};
programs.cabal-fmt = {
enable = true;
package = haskellNixTools.cabal-fmt;
};
# Disabled for GHC 9.10.
# programs.hlint = {
# enable = true;
# package = haskellNixTools.hlint;
# };

# Disabled for GHC 9.10.
# programs.cabal-fmt = {
# enable = true;
# package = haskellNixTools.cabal-fmt;
# };
programs.fourmolu = {
enable = true;
package = haskellNixTools.fourmolu;
};
programs.nixpkgs-fmt.enable = true;
programs.shellcheck.enable = true;

settings.formatter.hlint.excludes = haskellExcludes;
# Disabled for GHC 9.10.
#settings.formatter.hlint.excludes = haskellExcludes;

settings.formatter.fourmolu.excludes = haskellExcludes;
};

Expand All @@ -337,8 +347,8 @@
wasm = pkgs.mkShell {
packages = with inputs.ghc-wasm.packages.${system};
[
wasm32-wasi-ghc-9_8
wasm32-wasi-cabal-9_8
wasm32-wasi-ghc-9_10
wasm32-wasi-cabal-9_10
wasmtime

pkgs.gnumake
Expand Down Expand Up @@ -481,14 +491,17 @@
implicit-hie = "latest";

cabal = "latest";
hlint = "latest";

# Disabled for GHC 9.10.
#hlint = "latest";

# Disabled, as it doesn't currently build with Nix.
#weeder = weederVersion;

fourmolu = fourmoluVersion;

cabal-fmt = cabal-fmt-override;
# Disabled for GHC 9.10.
#cabal-fmt = cabal-fmt-override;

#TODO Explicitly requiring tasty-discover shouldn't be necessary - see the commented-out `build-tool-depends` in primer.cabal.
tasty-discover = "latest";
Expand Down
2 changes: 1 addition & 1 deletion primer-api/primer-api.cabal
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ library
-Wmissing-deriving-strategies -fhide-source-paths

build-depends:
, base >=4.12 && <4.20
, base >=4.12 && <4.21
, containers >=0.6.0.1 && <0.7.0
, deriving-aeson >=0.2 && <0.3.0
, extra >=1.7.10 && <1.8.0
Expand Down
2 changes: 1 addition & 1 deletion primer-benchmark/primer-benchmark.cabal
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ library
exposed-modules: Benchmarks
build-depends:
, aeson >=2.0 && <2.3
, base >=4.12 && <4.20
, base >=4.12 && <4.21
, containers >=0.6.0.1 && <0.7.0
, criterion ^>=1.6.0.0
, deepseq ^>=1.5
Expand Down
2 changes: 1 addition & 1 deletion primer-selda/primer-selda.cabal
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ library

build-depends:
, aeson >=2.0 && <2.3
, base >=4.12 && <4.20
, base >=4.12 && <4.21
, bytestring >=0.10.8.2 && <0.13
, containers >=0.6.0.1 && <0.7.0
, logging-effect ^>=1.4
Expand Down
2 changes: 1 addition & 1 deletion primer-service/primer-service.cabal
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ library

build-depends:
, aeson >=2.0 && <2.3
, base >=4.12 && <4.20
, base >=4.12 && <4.21
, containers >=0.6.0.1 && <0.8
, deriving-aeson >=0.2 && <0.3.0
, exceptions >=0.10.4 && <0.11.0
Expand Down
2 changes: 1 addition & 1 deletion primer/primer.cabal
Original file line number Diff line number Diff line change
Expand Up @@ -110,7 +110,7 @@ library
build-depends:
, aeson >=2.0 && <2.3
, assoc ^>=1.1
, base >=4.12 && <4.20
, base >=4.12 && <4.21
, base64-bytestring ^>=1.2.1
, containers >=0.6.0.1 && <0.7.0
, deriving-aeson >=0.2 && <0.3.0
Expand Down

1 comment on commit 1388baf

@github-actions
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ Performance Alert ⚠️

Possible performance regression was detected for benchmark 'Primer benchmarks'.
Benchmark result of this commit is worse than the previous benchmark result exceeding threshold 2.

Benchmark suite Current: 1388baf Previous: e7be104 Ratio
evalTestM/pure logs/mapEven 1: cpuTime 0.03481241198098341 cpuTime/iter 0.01018207694906933 cpuTime/iter 3.42
evalTestM/pure logs/mapEven 10: cpuTime 1.1204589989999993 cpuTime/iter 0.23411462290000024 cpuTime/iter 4.79
evalTestM/discard logs/mapEven 1: cpuTime 0.02731308866083813 cpuTime/iter 0.009141891668505465 cpuTime/iter 2.99
evalTestM/discard logs/mapEven 10: cpuTime 0.9607622821000006 cpuTime/iter 0.31572843899999903 cpuTime/iter 3.04
evalTestM/interp (has no logs)/mapEven 1: outlier variance 0.5587103238499798 outlier variance 0.2023145840165405 outlier variance 2.76
evalTestM/interp (has no logs)/mapEven 1: cpuTime 0.0002428196334006472 cpuTime/iter 0.00006812754211129831 cpuTime/iter 3.56
evalTestM/interp (has no logs)/mapEven 10: outlier variance 0.39249475310989496 outlier variance 0.018511925952296195 outlier variance 21.20
evalTestM/interp (has no logs)/mapEven 10: cpuTime 0.008751413087929344 cpuTime/iter 0.002828955556542803 cpuTime/iter 3.09
evalTestM/interp (has no logs)/mapEven 100: cpuTime 4.002325978899989 cpuTime/iter 1.2605829058999996 cpuTime/iter 3.17
typecheck/mapOdd 1: cpuTime 0.005637498678144515 cpuTime/iter 0.001540834170336242 cpuTime/iter 3.66
typecheck/mapOdd 10: outlier variance 0.6314265427627608 outlier variance 0.08712962824787443 outlier variance 7.25
typecheck/mapOdd 10: cpuTime 0.01000533919709485 cpuTime/iter 0.0027073824974648032 cpuTime/iter 3.70
typecheck/mapOdd 100: cpuTime 0.9300702156999953 cpuTime/iter 0.3324023939000014 cpuTime/iter 2.80
typecheck/mapOddPrim 1: cpuTime 0.006431012178019134 cpuTime/iter 0.0016983794778577476 cpuTime/iter 3.79
typecheck/mapOddPrim 10: outlier variance 0.5852007803090318 outlier variance 0.11025603476225841 outlier variance 5.31
typecheck/mapOddPrim 10: cpuTime 0.006495474882726583 cpuTime/iter 0.0020110036296707564 cpuTime/iter 3.23
typecheck/mapOddPrim 100: cpuTime 0.02943189551776077 cpuTime/iter 0.008238143585309634 cpuTime/iter 3.57

This comment was automatically generated by workflow using github-action-benchmark.

CC: @dhess

Please sign in to comment.