5 module Ganeti.HTools.Types
8 -- | The instance index type
11 -- | The node index type
14 -- | The type used to hold name-to-idx mappings
15 type NameAssoc = [(String, Int)]
19 This is similar to the JSON library Result type - *very* similar, but
20 we want to use it in multiple places, so we abstract it into a
29 instance Monad Result where
30 (>>=) (Bad x) _ = Bad x
31 (>>=) (Ok x) fn = fn x
35 -- | A generic class for items that have names and indices
39 setName :: a -> String -> a
40 setIdx :: a -> Int -> a