From 5066672fe5b500fdeed4ee4824280675fe690556 Mon Sep 17 00:00:00 2001
From: Herbert Valerio Riedel <hvr@gnu.org>
Date: Sat, 3 Mar 2018 10:31:18 +0100
Subject: [PATCH] Fine-tune lower bound on lib:Cabal

GHC 8.4.1-rc1 (GHC 8.4.0.20180224) unfortunately still shipped with a
devel snapshot of Cabal-2.1.0.0; but GHC 8.4.1 final will ship w/
lib:Cabal-2.2.0.0
---
 cabal-install/Distribution/Client/ProjectPlanning.hs | 6 +++++-
 1 file changed, 5 insertions(+), 1 deletion(-)

diff --git a/cabal-install/Distribution/Client/ProjectPlanning.hs b/cabal-install/Distribution/Client/ProjectPlanning.hs
index 8fa2d9ec8e..50ae2ee221 100644
--- a/cabal-install/Distribution/Client/ProjectPlanning.hs
+++ b/cabal-install/Distribution/Client/ProjectPlanning.hs
@@ -1039,7 +1039,7 @@ planPackages verbosity comp platform solver SolverSettings{..}
     -- respective major Cabal version bundled with the respective GHC
     -- release).
     --
-    -- GHC 8.4   needs  Cabal >= 2.1  (GHC 8.4.1-rc1 has Cabal-2.1)
+    -- GHC 8.4   needs  Cabal >= 2.2
     -- GHC 8.2   needs  Cabal >= 2.0
     -- GHC 8.0   needs  Cabal >= 1.24
     -- GHC 7.10  needs  Cabal >= 1.22
@@ -1050,6 +1050,10 @@ planPackages verbosity comp platform solver SolverSettings{..}
     -- TODO: long-term, this compatibility matrix should be
     --       stored as a field inside 'Distribution.Compiler.Compiler'
     setupMinCabalVersionConstraint
+      | isGHC, compVer >= mkVersion [8,4,1] = mkVersion [2,2]
+        -- GHC 8.4.1-rc1 (GHC 8.4.0.20180224) still shipped with an
+        -- devel snapshot of Cabal-2.1.0.0; the rule below can be
+        -- dropped at some point
       | isGHC, compVer >= mkVersion [8,4]  = mkVersion [2,1]
       | isGHC, compVer >= mkVersion [8,2]  = mkVersion [2,0]
       | isGHC, compVer >= mkVersion [8,0]  = mkVersion [1,24]
-- 
GitLab