Revision 4333a887 Ganeti/HTools/Types.hs
b/Ganeti/HTools/Types.hs | ||
---|---|---|
60 | 60 |
idx = Instance.idx |
61 | 61 |
setName = Instance.setName |
62 | 62 |
setIdx = Instance.setIdx |
63 |
|
|
64 |
-- | Compute the name of an element in a container |
|
65 |
cNameOf :: (Element a) => Container.Container a -> Container.Key -> String |
|
66 |
cNameOf c k = name $ Container.find k c |
|
67 |
|
|
68 |
-- | Compute the maximum name length in an Element Container |
|
69 |
cMaxNamelen :: (Element a) => Container.Container a -> Int |
|
70 |
cMaxNamelen = maximum . map (length . name) . Container.elems |
Also available in: Unified diff