haskellPackages.extensions: use Cabal core pkg if possible
For GHC 9.6 and 9.8 we can use the Cabal library bundled with GHC since it matches the requested version. This can prevent inconsistent dependencies later in e.g. haskell-language-server. For lower versions we may need to jailbreak and downgrade Cabal to which upstream seems to be open: > We need to pin a single major version of Cabal here because the main > reason we use Cabal is for its list of extensions. Later versions have > strictly more extensions, and we'll have missing patterns if we try to > support more than one major version. If this causes problems in > practice let's revisit this decision and come up with another > approach. Alternatively, hls-stan-plugin can be disabled.
This commit is contained in:
@@ -92,10 +92,13 @@ self: super: {
|
||||
guardian
|
||||
;
|
||||
|
||||
# Extensions needs the latest version of Cabal for its list of Haskell language
|
||||
# extensions.
|
||||
# Extensions wants the latest version of Cabal for its list of Haskell
|
||||
# language extensions.
|
||||
extensions = super.extensions.override {
|
||||
Cabal = self.Cabal_3_10_2_1;
|
||||
Cabal =
|
||||
if versionOlder self.ghc.version "9.6"
|
||||
then self.Cabal_3_10_2_1
|
||||
else null; # use GHC bundled version
|
||||
};
|
||||
|
||||
#######################################
|
||||
|
||||
Reference in New Issue
Block a user