From bebe7a731b05cff55dc5fdfa70bf4984037a2568 Mon Sep 17 00:00:00 2001
From: Iustin Pop <iustin@google.com>
Date: Tue, 6 Mar 2012 22:13:24 +0200
Subject: [PATCH] Add a simple type alias for nicer type signatures

Signed-off-by: Iustin Pop <iustin@google.com>
Reviewed-by: Guido Trotter <ultrotter@google.com>
---
 htools/Ganeti/HTools/Cluster.hs | 14 ++++++--------
 1 file changed, 6 insertions(+), 8 deletions(-)

diff --git a/htools/Ganeti/HTools/Cluster.hs b/htools/Ganeti/HTools/Cluster.hs
index e2ec8b8e7..92a1e629c 100644
--- a/htools/Ganeti/HTools/Cluster.hs
+++ b/htools/Ganeti/HTools/Cluster.hs
@@ -172,6 +172,10 @@ type AllocMethod =  Node.List           -- ^ Node list
                  -> [CStats]            -- ^ Running cluster stats
                  -> Result AllocResult  -- ^ Allocation result
 
+-- | A simple type for the running solution of evacuations.
+type EvacInnerState =
+  Either String (Node.List, Instance.Instance, Score, Ndx)
+
 -- * Utility functions
 
 -- | Verifies the N+1 status and return the affected nodes.
@@ -952,15 +956,9 @@ nodeEvacInstance nl il ChangeAll
 evacDrbdSecondaryInner :: Node.List -- ^ Cluster node list
                        -> Instance.Instance -- ^ Instance being evacuated
                        -> Gdx -- ^ The group index of the instance
-                       -> Either String ( Node.List
-                                        , Instance.Instance
-                                        , Score
-                                        , Ndx)  -- ^ Current best solution
+                       -> EvacInnerState  -- ^ Current best solution
                        -> Ndx  -- ^ Node we're evaluating as new secondary
-                       -> Either String ( Node.List
-                                        , Instance.Instance
-                                        , Score
-                                        , Ndx) -- ^ New best solution
+                       -> EvacInnerState -- ^ New best solution
 evacDrbdSecondaryInner nl inst gdx accu ndx =
   case applyMove nl inst (ReplaceSecondary ndx) of
     OpFail fm ->
-- 
GitLab