From df12e0ac36aefae2ee28a92ed06ca8b9648b54a4 Mon Sep 17 00:00:00 2001 From: Michael Orlitzky Date: Sun, 2 Feb 2020 12:26:47 -0500 Subject: [PATCH] mailbox-count.cabal: depend on semigroups conditionally. Just kidding, when the semigroups package promises "a backwards- compatible API," what they mean is that they deleted the entire source tree in the minor release 0.18.2 and nothing works at all. So instead, we need to do a version check on GHC within the cabal file, and conditionally depend on a version of semigroups before 0.18.2. --- mailbox-count.cabal | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) diff --git a/mailbox-count.cabal b/mailbox-count.cabal index 0f14055..6b0716e 100644 --- a/mailbox-count.cabal +++ b/mailbox-count.cabal @@ -163,9 +163,13 @@ executable mailbox-count HDBC-postgresql >= 2.3, HDBC-sqlite3 >= 2.3, MissingH >= 1.2, - semigroups >= 0.18, tasty >= 0.8, tasty-hunit >= 0.8 + -- Data.Semigroup was added to GHC.Base in ghc-8.0 + if impl(ghc < 8.0) + -- The minor version 0.18.2 deleted the entire API? + build-depends: semigroups < 0.18.2 + main-is: Main.hs @@ -210,10 +214,12 @@ test-suite testsuite HDBC-postgresql >= 2.3, HDBC-sqlite3 >= 2.3, MissingH >= 1.2, - semigroups >= 0.18, tasty >= 0.8, tasty-hunit >= 0.8 - + -- Data.Semigroup was added to GHC.Base in ghc-8.0 + if impl(ghc < 8.0) + -- The minor version 0.18.2 deleted the entire API? + build-depends: semigroups < 0.18.2 test-suite doctests -- 2.43.2