From ed9203928be26bb6289f4465ec7638a75089dcea Mon Sep 17 00:00:00 2001 From: Joey Hess Date: Sat, 16 May 2015 13:28:19 -0400 Subject: [PATCH] add trivial HasImage instance for Image --- src/Propellor/Property/Docker.hs | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/Propellor/Property/Docker.hs b/src/Propellor/Property/Docker.hs index 8e60c2a..fdc312c 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