Generalise the Result type
[ganeti-local] / htest / Test / Ganeti / JSON.hs
index 6279520..a5477a5 100644 (file)
@@ -49,7 +49,7 @@ prop_toArrayFail :: Int -> String -> Bool -> Property
 prop_toArrayFail i s b =
   -- poor man's instance Arbitrary JSValue
   forAll (elements [J.showJSON i, J.showJSON s, J.showJSON b]) $ \item ->
-  case JSON.toArray item of
+  case JSON.toArray item::BasicTypes.Result [J.JSValue] of
     BasicTypes.Bad _ -> passTest
     BasicTypes.Ok result -> failTest $ "Unexpected parse, got " ++ show result