add trivial HasImage instance for Image
This commit is contained in:
parent
a781e43b22
commit
ed9203928b
|
@ -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
|
||||
|
||||
|
|
Loading…
Reference in New Issue