Fix 'JobIdListOnly' type from 'List' to 'Map'
authorJose A. Lopes <jabolopes@google.com>
Fri, 7 Feb 2014 12:07:11 +0000 (13:07 +0100)
committerJose A. Lopes <jabolopes@google.com>
Mon, 10 Feb 2014 10:44:47 +0000 (11:44 +0100)
* This patch fixes a type discrepancy between the Haskell type
  'Ganeti.OpCodes.JobIdListOnly' and the Python type predicate
  'ganeti.ht.TJobIdListOnly', the former being a list and the latter a
  dictionary.

* Remove some whitespace

Signed-off-by: Jose A. Lopes <jabolopes@google.com>
Reviewed-by: Helga Velroyen <helgav@google.com>

src/Ganeti/OpCodes.hs

index 239ff70..8cf15b7 100644 (file)
@@ -78,10 +78,10 @@ instance PyValue a => PyValue (SetParamsMods a) where
 
 instance PyValue a => PyValue (NonNegative a) where
   showValue = showValue . fromNonNegative
-  
+
 instance PyValue a => PyValue (NonEmpty a) where
   showValue = showValue . fromNonEmpty
-  
+
 -- FIXME: should use the 'toRaw' function instead of being harcoded or
 -- perhaps use something similar to the NonNegative type instead of
 -- using the declareSADT
@@ -107,7 +107,7 @@ instance PyValue JSValue where
   showValue (JSObject obj) = showValue obj
   showValue x = show x
 
-type JobIdListOnly = [(Bool, Either String JobId)]
+type JobIdListOnly = Map String [(Bool, Either String JobId)]
 
 type InstanceMultiAllocResponse =
   ([(Bool, Either String JobId)], NonEmptyString)