From 14fe4c4d6b5a29be94ecfc0572e0f9a9a081e795 Mon Sep 17 00:00:00 2001 From: Joey Hess Date: Mon, 30 Apr 2018 09:03:46 -0400 Subject: fix broken SemigroupMonoid transition <> Turns out that with ghc 8.2.2, the instructions given on the page don't work. And the cppless variant that I had compiles, but into effectively mappend = mappend so it loops. The only way I can see to make it work without cpp is to use mappend = (Sem.<>) which is ugly and a land mine waiting to explode if someone changes it to a nicer mappend = (<>) with a newer version of ghc which will compile it and work ok, while breaking it with 8.2.2. Sigh. I posted to haskell-cafe about this. --- src/Propellor/Property/Parted/Types.hs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src/Propellor/Property/Parted/Types.hs') diff --git a/src/Propellor/Property/Parted/Types.hs b/src/Propellor/Property/Parted/Types.hs index 5891cc16..11e0947c 100644 --- a/src/Propellor/Property/Parted/Types.hs +++ b/src/Propellor/Property/Parted/Types.hs @@ -31,7 +31,7 @@ instance Sem.Semigroup PartTable where instance Monoid PartTable where -- | default TableType is MSDOS, with a `safeAlignment`. mempty = PartTable MSDOS safeAlignment [] - mappend = (<>) + mappend = (Sem.<>) -- | A partition on the disk. data Partition = Partition @@ -93,7 +93,7 @@ instance Sem.Semigroup PartSize where instance Monoid PartSize where mempty = MegaBytes 0 - mappend = (<>) + mappend = (Sem.<>) reducePartSize :: PartSize -> PartSize -> PartSize reducePartSize (MegaBytes a) (MegaBytes b) = MegaBytes (a - b) -- cgit v1.2.3