Shorten some function names
[ganeti-local] / htools / Ganeti / HTools / Utils.hs
index b1898eb..2374f0b 100644 (file)
@@ -31,20 +31,10 @@ module Ganeti.HTools.Utils
   , select
   , applyIf
   , commaJoin
-  , readEitherString
-  , JSRecord
-  , loadJSArray
-  , fromObj
-  , fromObjWithDefault
-  , maybeFromObj
-  , tryFromObj
-  , fromJVal
-  , asJSObject
-  , asObjectList
-  , fromJResult
   , tryRead
   , formatTable
   , parseUnit
+  , plural
   ) where
 
 import Data.Char (toUpper)
@@ -52,9 +42,6 @@ import Data.List
 
 import Debug.Trace
 
--- we will re-export these for our existing users
-import Ganeti.HTools.JSON
-
 -- * Debug functions
 
 -- | To be used only for debugging, breaks referential integrity.
@@ -90,6 +77,11 @@ sepSplit sep s
   where (x, xs) = break (== sep) s
         ys = drop 1 xs
 
+-- | Simple pluralize helper
+plural :: Int -> String -> String -> String
+plural 1 s _ = s
+plural _ _ p = p
+
 -- * Mathematical functions
 
 -- Simple and slow statistical functions, please replace with better