From 2485487d2fe02129059253ef163a2d609a949b80 Mon Sep 17 00:00:00 2001 From: Iustin Pop Date: Tue, 14 Jul 2009 16:15:25 +0200 Subject: [PATCH] Fix a few hlint errors --- Ganeti/HTools/Cluster.hs | 4 ++-- Ganeti/HTools/Luxi.hs | 2 +- hspace.hs | 2 +- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/Ganeti/HTools/Cluster.hs b/Ganeti/HTools/Cluster.hs index 9deaece..f7a6e69 100644 --- a/Ganeti/HTools/Cluster.hs +++ b/Ganeti/HTools/Cluster.hs @@ -483,8 +483,8 @@ tryAlloc nl _ inst 2 = tryAlloc nl _ inst 1 = let all_nodes = getOnline nl - sols = foldl' (\cstate p -> - concatAllocs cstate $ allocateOnSingle nl inst p + sols = foldl' (\cstate -> + concatAllocs cstate . allocateOnSingle nl inst ) ([], 0, Nothing) all_nodes in return sols diff --git a/Ganeti/HTools/Luxi.hs b/Ganeti/HTools/Luxi.hs index 68d5ffc..487929d 100644 --- a/Ganeti/HTools/Luxi.hs +++ b/Ganeti/HTools/Luxi.hs @@ -266,7 +266,7 @@ parseNode v = fail ("Invalid node query result: " ++ show v) -- | Builds the cluster data from an URL. loadData :: String -- ^ Unix socket to use as source -> IO (Result (Node.AssocList, Instance.AssocList)) -loadData master = do -- IO monad +loadData master = E.bracket (getClient master) closeClient diff --git a/hspace.hs b/hspace.hs index 89e50de..9f9f012 100644 --- a/hspace.hs +++ b/hspace.hs @@ -312,7 +312,7 @@ main = do let ini_cv = Cluster.compCV nl ini_stats = Cluster.totalResources nl - when (verbose > 2) $ do + when (verbose > 2) $ hPrintf stderr "Initial coefficients: overall %.8f, %s\n" ini_cv (Cluster.printStats nl) -- 1.7.10.4