diff options
| author | Joey Hess <joey@kitenet.net> | 2014-05-31 21:18:36 -0400 |
|---|---|---|
| committer | Joey Hess <joey@kitenet.net> | 2014-05-31 21:18:36 -0400 |
| commit | 7c4b1537391d801855e28a61c896efcc70cfaa81 (patch) | |
| tree | 010b433c4f9eae6f0336ad0735f2893cf0a7498e /src/Propellor/Property | |
| parent | d1eafb12776d6487ecd48d3991838032a81181d6 (diff) | |
simplify monoid instance with some helper types
Diffstat (limited to 'src/Propellor/Property')
| -rw-r--r-- | src/Propellor/Property/Docker.hs | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/Propellor/Property/Docker.hs b/src/Propellor/Property/Docker.hs index 8e081ae4..ce10d318 100644 --- a/src/Propellor/Property/Docker.hs +++ b/src/Propellor/Property/Docker.hs @@ -48,7 +48,7 @@ type ContainerName = String container :: ContainerName -> Image -> Host container cn image = Host hn [] attr where - attr = mempty { _dockerImage = Just image } + attr = mempty { _dockerImage = Val image } hn = cn2hn cn cn2hn :: ContainerName -> HostName @@ -116,7 +116,7 @@ findContainer mhost cid cn mk = case mhost of mkContainer :: ContainerId -> Host -> Maybe Container mkContainer cid@(ContainerId hn _cn) h = Container - <$> _dockerImage attr + <$> fromVal (_dockerImage attr) <*> pure (map (\a -> a hn) (_dockerRunParams attr)) where attr = hostAttr h' |
