Small whitespace change
[ganeti-local] / Ganeti / HTools / Types.hs
index a0a83af..c1e4674 100644 (file)
@@ -3,12 +3,20 @@
 -}
 
 module Ganeti.HTools.Types
-    where
+    ( Idx
+    , Ndx
+    , NameAssoc
+    , Result(..)
+    , Element(..)
+    ) where
 
--- | The type used to hold idx-to-name mappings
-type NameList = [(Int, String)]
+-- | The instance index type.
+type Idx = Int
 
--- | The type used to hold name-to-idx mappings
+-- | The node index type.
+type Ndx = Int
+
+-- | The type used to hold name-to-idx mappings.
 type NameAssoc = [(String, Int)]
 
 {-|
@@ -29,9 +37,13 @@ instance Monad Result where
     return = Ok
     fail = Bad
 
--- | A generic class for items that have names and indices
+-- | A generic class for items that have updateable names and indices.
 class Element a where
+    -- | Returns the name of the element
     nameOf  :: a -> String
+    -- | Returns the index of the element
     idxOf   :: a -> Int
+    -- | Updates the name of the element
     setName :: a -> String -> a
+    -- | Updates the index of the element
     setIdx  :: a -> Int -> a