diff options
| author | Joey Hess <joeyh@joeyh.name> | 2015-01-19 14:15:49 -0400 |
|---|---|---|
| committer | Joey Hess <joeyh@joeyh.name> | 2015-01-19 14:15:49 -0400 |
| commit | 1ae21965aaba0303088052e873fea39708e331ed (patch) | |
| tree | 918a8e0575e6369e3d94598d675b089c54579cf2 /src/Propellor/Property/Docker.hs | |
| parent | db93c41f90e9ad68854b6b219fc9fe6d12085600 (diff) | |
rename HostLike to PropAccum
This is more general; it doesn't need to contain a Host.
It would, for example, be possible to make Property itself be an instance
of PropAccum.
Diffstat (limited to 'src/Propellor/Property/Docker.hs')
| -rw-r--r-- | src/Propellor/Property/Docker.hs | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/Propellor/Property/Docker.hs b/src/Propellor/Property/Docker.hs index 3e2fbaf3..e65d6bb7 100644 --- a/src/Propellor/Property/Docker.hs +++ b/src/Propellor/Property/Docker.hs @@ -77,10 +77,10 @@ type ContainerName = String -- | A docker container. data Container = Container Image Host -instance Hostlike Container where +instance PropAccum Container where (Container i h) & p = Container i (h & p) (Container i h) &^ p = Container i (h &^ p) - getHost (Container _ h) = h + getProperties (Container _ h) = hostProperties h -- | Defines a Container with a given name, image, and properties. -- Properties can be added to configure the Container. @@ -134,7 +134,7 @@ docked ctr@(Container _ h) = RevertableProperty ] propigateContainerInfo :: Container -> Property -> Property -propigateContainerInfo ctr@(Container _ h) p = propigateHostLike ctr p' +propigateContainerInfo ctr@(Container _ h) p = propigateContainer ctr p' where p' = p { propertyInfo = propertyInfo p <> dockerinfo } dockerinfo = dockerInfo $ |
