summaryrefslogtreecommitdiff
path: root/src/Propellor/Property/Docker.hs
diff options
context:
space:
mode:
authorJoey Hess2015-05-16 13:28:19 -0400
committerJoey Hess2015-05-16 13:28:19 -0400
commited9203928be26bb6289f4465ec7638a75089dcea (patch)
tree56aeb55768f3c9c9fc5dc1b1efe6a98eac4652e9 /src/Propellor/Property/Docker.hs
parenta781e43b227afcf094387057ade072d442b4ff6a (diff)
add trivial HasImage instance for Image
Diffstat (limited to 'src/Propellor/Property/Docker.hs')
-rw-r--r--src/Propellor/Property/Docker.hs5
1 files changed, 4 insertions, 1 deletions
diff --git a/src/Propellor/Property/Docker.hs b/src/Propellor/Property/Docker.hs
index 8e60c2a0..fdc312ce 100644
--- a/src/Propellor/Property/Docker.hs
+++ b/src/Propellor/Property/Docker.hs
@@ -1,4 +1,4 @@
-{-# LANGUAGE FlexibleContexts #-}
+{-# LANGUAGE FlexibleContexts, TypeSynonymInstances, FlexibleInstances #-}
-- | Docker support for propellor
--
@@ -85,6 +85,9 @@ data Container = Container Image Host
class HasImage a where
getImageName :: a -> Image
+instance HasImage Image where
+ getImageName = id
+
instance HasImage Container where
getImageName (Container i _) = i