From: Michael Orlitzky Date: Sun, 2 Feb 2020 17:26:47 +0000 (-0500) Subject: mailbox-count.cabal: depend on semigroups conditionally. X-Git-Tag: 0.0.4~2 X-Git-Url: https://gitweb.michael.orlitzky.com/?a=commitdiff_plain;h=df12e0ac36aefae2ee28a92ed06ca8b9648b54a4;p=mailbox-count.git 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. --- 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