summaryrefslogtreecommitdiff
path: root/src/Propellor/Types/Docker.hs
diff options
context:
space:
mode:
Diffstat (limited to 'src/Propellor/Types/Docker.hs')
-rw-r--r--src/Propellor/Types/Docker.hs10
1 files changed, 7 insertions, 3 deletions
diff --git a/src/Propellor/Types/Docker.hs b/src/Propellor/Types/Docker.hs
index 6ff340e5..79577591 100644
--- a/src/Propellor/Types/Docker.hs
+++ b/src/Propellor/Types/Docker.hs
@@ -7,6 +7,7 @@ import Propellor.Types.Empty
import Propellor.Types.Info
import Data.Monoid
+import qualified Data.Semigroup as Sem
import qualified Data.Map as M
data DockerInfo = DockerInfo
@@ -18,13 +19,16 @@ data DockerInfo = DockerInfo
instance IsInfo DockerInfo where
propagateInfo _ = PropagateInfo False
-instance Monoid DockerInfo where
- mempty = DockerInfo mempty mempty
- mappend old new = DockerInfo
+instance Sem.Semigroup DockerInfo where
+ old <> new = DockerInfo
{ _dockerRunParams = _dockerRunParams old <> _dockerRunParams new
, _dockerContainers = M.union (_dockerContainers old) (_dockerContainers new)
}
+instance Monoid DockerInfo where
+ mempty = DockerInfo mempty mempty
+ mappend = (<>)
+
instance Empty DockerInfo where
isEmpty i = and
[ isEmpty (_dockerRunParams i)