Skip to content

Adapt to more recent haskell.nix #107

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

Merged
merged 3 commits into from
Feb 20, 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
2 changes: 1 addition & 1 deletion src/core/mkShellWith.nix
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ let
};

ghc = if shell.tools.haskellCompilerVersion == null then
"ghc8107"
"ghc96"
else
shell.tools.haskellCompilerVersion;

Expand Down
2 changes: 1 addition & 1 deletion src/ext/cabal-fmt.nix
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ let

version = "0.1.12";

compiler-nix-name = "ghc92";
compiler-nix-name = "ghc96";
Copy link

Choose a reason for hiding this comment

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

💡 Verification agent

🧩 Analysis chain

Verify cabal-fmt compatibility and dependencies.

The change to ghc96 aligns with the PR objectives. Please verify:

  1. That cabal-fmt 0.1.12 is compatible with GHC 9.6.
  2. That Cabal 3.6 is still the required version when using GHC 9.6 (referenced in the comment at line 14).

🌐 Web query:

Is cabal-fmt 0.1.12 compatible with GHC 9.6? What version of Cabal library does it require?

💡 Result:

cabal-fmt 0.1.12 is compatible with GHC 9.6 and requires Cabal-syntax ≥3.12. The Hackage entry explicitly lists ghc ==... || ==9.6... in its tested-with configurations[7], confirming compatibility with GHC 9.x versions including 9.6.x.

For dependencies:

  • Cabal-syntax ≥3.12 is explicitly required[7]
  • This version of Cabal-syntax corresponds to Cabal ≥3.x (Cabal-syntax split from Cabal in later versions)

While standard GHC 9.x installations bundle older Cabal versions (e.g., Cabal-3.10 with GHC-9.6[3]), cabal-fmt can still work by pulling newer Cabal-syntax versions through dependency resolution during installation[7].

Citations:


Action Required: Update Dependency Documentation

  • Compatibility Confirmed: cabal-fmt 0.1.12 is compatible with GHC 9.6.
  • Dependency Update: cabal-fmt now requires Cabal-syntax ≥3.12 (which implies using a Cabal ≥3.x) rather than specifically Cabal 3.6.
  • Note: Although standard GHC 9.6 installations may bundle an older Cabal version (e.g., Cabal-3.10), dependency resolution will fetch the required Cabal-syntax version. The comment at line 14 referencing Cabal 3.6 should be updated accordingly.


# Cabal is a lib library, so haskell.nix would normally use the one coming
# from the compiler-nix-name (currently 3.2). However cabal-fmt depends on
Expand Down
2 changes: 1 addition & 1 deletion src/ext/fourmolu.nix
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ let
project = pkgs.haskell-nix.hackage-project {
name = "fourmolu";
version = "0.16.2.0";
compiler-nix-name = "ghc982";
compiler-nix-name = "ghc98";

modules =
[{ packages.fourmolu.components.exes.fourmolu.dontStrip = false; }];
Expand Down