diff options
| author | Joey Hess <joeyh@joeyh.name> | 2015-05-16 13:28:19 -0400 |
|---|---|---|
| committer | Joey Hess <joeyh@joeyh.name> | 2015-05-16 13:28:19 -0400 |
| commit | ed9203928be26bb6289f4465ec7638a75089dcea (patch) | |
| tree | 56aeb55768f3c9c9fc5dc1b1efe6a98eac4652e9 /src | |
| parent | a781e43b227afcf094387057ade072d442b4ff6a (diff) | |
add trivial HasImage instance for Image
Diffstat (limited to 'src')
| -rw-r--r-- | src/Propellor/Property/Docker.hs | 5 |
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 |
