summaryrefslogtreecommitdiff
path: root/src/Propellor/Types
diff options
context:
space:
mode:
authorJoey Hess2018-04-30 09:03:46 -0400
committerJoey Hess2018-04-30 09:03:46 -0400
commit14fe4c4d6b5a29be94ecfc0572e0f9a9a081e795 (patch)
tree38ad23b09bd21a8569568335a13bfde9c16e79c1 /src/Propellor/Types
parent96ea8e04251bc23dd27faf1f486a2a9f9c29ff98 (diff)
fix broken SemigroupMonoid transition <<loop>>
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.
Diffstat (limited to 'src/Propellor/Types')
-rw-r--r--src/Propellor/Types/Chroot.hs4
-rw-r--r--src/Propellor/Types/Core.hs2
-rw-r--r--src/Propellor/Types/Dns.hs2
-rw-r--r--src/Propellor/Types/Docker.hs2
-rw-r--r--src/Propellor/Types/Info.hs2
-rw-r--r--src/Propellor/Types/Result.hs2
6 files changed, 7 insertions, 7 deletions
diff --git a/src/Propellor/Types/Chroot.hs b/src/Propellor/Types/Chroot.hs
index b3751a9a..33742c86 100644
--- a/src/Propellor/Types/Chroot.hs
+++ b/src/Propellor/Types/Chroot.hs
@@ -28,7 +28,7 @@ instance Sem.Semigroup ChrootInfo where
instance Monoid ChrootInfo where
mempty = ChrootInfo mempty mempty
- mappend = (<>)
+ mappend = (Sem.<>)
instance Empty ChrootInfo where
isEmpty i = and
@@ -49,7 +49,7 @@ instance Sem.Semigroup ChrootCfg where
instance Monoid ChrootCfg where
mempty = NoChrootCfg
- mappend = (<>)
+ mappend = (Sem.<>)
instance Empty ChrootCfg where
isEmpty c= c == NoChrootCfg
diff --git a/src/Propellor/Types/Core.hs b/src/Propellor/Types/Core.hs
index cd3e09c5..88c749b3 100644
--- a/src/Propellor/Types/Core.hs
+++ b/src/Propellor/Types/Core.hs
@@ -62,7 +62,7 @@ instance Sem.Semigroup (Propellor Result) where
instance Monoid (Propellor Result) where
mempty = return NoChange
- mappend = (<>)
+ mappend = (Sem.<>)
-- | An action that Propellor runs at the end, after trying to satisfy all
-- properties. It's passed the combined Result of the entire Propellor run.
diff --git a/src/Propellor/Types/Dns.hs b/src/Propellor/Types/Dns.hs
index 21a4860c..30302a7d 100644
--- a/src/Propellor/Types/Dns.hs
+++ b/src/Propellor/Types/Dns.hs
@@ -194,7 +194,7 @@ instance Sem.Semigroup NamedConfMap where
instance Monoid NamedConfMap where
mempty = NamedConfMap M.empty
- mappend = (<>)
+ mappend = (Sem.<>)
instance Empty NamedConfMap where
isEmpty (NamedConfMap m) = isEmpty m
diff --git a/src/Propellor/Types/Docker.hs b/src/Propellor/Types/Docker.hs
index 72703b82..2cd72af2 100644
--- a/src/Propellor/Types/Docker.hs
+++ b/src/Propellor/Types/Docker.hs
@@ -28,7 +28,7 @@ instance Sem.Semigroup DockerInfo where
instance Monoid DockerInfo where
mempty = DockerInfo mempty mempty
- mappend = (<>)
+ mappend = (Sem.<>)
instance Empty DockerInfo where
isEmpty i = and
diff --git a/src/Propellor/Types/Info.hs b/src/Propellor/Types/Info.hs
index 2ab6da7b..b941cc8f 100644
--- a/src/Propellor/Types/Info.hs
+++ b/src/Propellor/Types/Info.hs
@@ -87,7 +87,7 @@ instance Sem.Semigroup (InfoVal v) where
instance Monoid (InfoVal v) where
mempty = NoInfoVal
- mappend = (<>)
+ mappend = (Sem.<>)
instance (Typeable v, Show v) => IsInfo (InfoVal v) where
propagateInfo _ = PropagateInfo False
diff --git a/src/Propellor/Types/Result.hs b/src/Propellor/Types/Result.hs
index f552b29b..cc03edd8 100644
--- a/src/Propellor/Types/Result.hs
+++ b/src/Propellor/Types/Result.hs
@@ -18,7 +18,7 @@ instance Sem.Semigroup Result where
instance Monoid Result where
mempty = NoChange
- mappend = (<>)
+ mappend = (Sem.<>)
class ToResult t where
toResult :: t -> Result