@@ -5,9 +5,11 @@ module Data.SwaggerSpec where
55
66import Data.Aeson
77import Data.Aeson.QQ
8+import qualified Data.Foldable as F
89import Data.HashMap.Strict (HashMap)
910import qualified Data.HashMap.Strict as HashMap
1011import Data.Maybe
12+import Data.Monoid
1113import qualified Data.Vector as Vector
1214import Data.Text (Text)
1315
@@ -17,10 +19,10 @@ import Test.Hspec
1719
1820isSubJSON :: Value -> Value -> Bool
1921isSubJSON Null _ = True
20−isSubJSON (Object x) (Object y) = HashMap.keys x == HashMap.keys i && and i
22+isSubJSON (Object x) (Object y) = HashMap.keys x == HashMap.keys i && F.and i
2123 where
2224 i = HashMap.intersectionWith isSubJSON x y
23−isSubJSON (Array xs) (Array ys) = Vector.length xs == Vector.length ys && and (Vector.zipWith isSubJSON xs ys)
25+isSubJSON (Array xs) (Array ys) = Vector.length xs == Vector.length ys && F.and (Vector.zipWith isSubJSON xs ys)
2426isSubJSON x y = x == y
2527
2628(<~>) :: (Eq a, Show a, ToJSON a, FromJSON a) => a -> Value -> Spec