From 9228bda32f0a3f6d52e7cc5eb444376e7b024d8c Mon Sep 17 00:00:00 2001 From: Joey Hess Date: Mon, 23 Apr 2018 13:20:13 -0400 Subject: semigroup monoid change fallout; drop ghc 7 support Fix build with ghc 8.4, which broke due to the Semigroup Monoid change. See https://prime.haskell.org/wiki/Libraries/Proposals/SemigroupMonoid Dropped support for building propellor with ghc 7 (as in debian oldstable), to avoid needing to depend on the semigroups transitional package, but also because it's just too old to be worth supporting. If we indeed drop ghc 7 support entirely, some code to support "jessie" can be removed; concurrent-output can be de-embedded, and the Singletons code can be simplified. This commit was sponsored by Jack Hill on Patreon. --- src/Propellor/Property/Ccache.hs | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) (limited to 'src/Propellor/Property/Ccache.hs') diff --git a/src/Propellor/Property/Ccache.hs b/src/Propellor/Property/Ccache.hs index a2bef117..ebc21b88 100644 --- a/src/Propellor/Property/Ccache.hs +++ b/src/Propellor/Property/Ccache.hs @@ -14,6 +14,7 @@ import qualified Propellor.Property.Apt as Apt import Utility.FileMode import Utility.DataUnits import System.Posix.Files +import qualified Data.Semigroup as Sem -- | Limits on the size of a ccache data Limit @@ -25,9 +26,12 @@ data Limit | NoLimit | Limit :+ Limit +instance Sem.Semigroup Limit where + (<>) = (:+) + instance Monoid Limit where mempty = NoLimit - mappend = (:+) + mappend = (<>) -- | A string that will be parsed to get a data size. -- -- cgit v1.2.3