summaryrefslogtreecommitdiff
path: root/Propellor/Types
diff options
context:
space:
mode:
authorJoey Hess2014-04-11 00:36:33 -0400
committerJoey Hess2014-04-11 00:36:33 -0400
commit724f354b25275b59546c41201178380eb9369037 (patch)
tree8afdb41ca597a4ec602e6cbf31d373f09a591ad3 /Propellor/Types
parent29ae27af3c59a221fa60995f435ca2e4a5c6d76e (diff)
show instance
Diffstat (limited to 'Propellor/Types')
-rw-r--r--Propellor/Types/Attr.hs8
1 files changed, 8 insertions, 0 deletions
diff --git a/Propellor/Types/Attr.hs b/Propellor/Types/Attr.hs
index 70161725..9e8058fe 100644
--- a/Propellor/Types/Attr.hs
+++ b/Propellor/Types/Attr.hs
@@ -21,6 +21,14 @@ instance Eq Attr where
in simpl x == simpl y
]
+instance Show Attr where
+ show a = unlines
+ [ "hostname " ++ _hostname a
+ , "cnames " ++ show (_cnames a)
+ , "docker image " ++ show (_dockerImage a)
+ , "docker run params " ++ show (map (\a -> a "") (_dockerRunParams a))
+ ]
+
newAttr :: HostName -> Attr
newAttr hn = Attr hn S.empty Nothing []