Also replace a type with its synonim.
(bad_nodes, bad_instances)
-- | Compute the total free disk and memory in the cluster.
-totalResources :: Container.Container Node.Node -> (Int, Int)
+totalResources :: Node.List -> (Int, Int)
totalResources nl =
foldl'
(\ (mem, dsk) node -> (mem + (Node.f_mem node),
debug
, sepSplit
, varianceCoeff
- , readData
, commaJoin
, readEitherString
, loadJSArray
varianceCoeff :: Floating a => [a] -> a
varianceCoeff lst = (stdDev lst) / (fromIntegral $ length lst)
--- | Get an Ok result or print the error and exit.
-readData :: Result a -> IO a
-readData nd =
- (case nd of
- Bad x -> do
- putStrLn x
- exitWith $ ExitFailure 1
- Ok x -> return x)
-
-- * JSON-related functions
-- | Converts a JSON Result into a monadic value.