@@ -221,53 +221,55 @@ mapTests = do
221
221
222
222
log " lookupLE result is correct"
223
223
quickCheck $ \k (TestMap m) -> case M .lookupLE k (smallKeyToNumberMap m) of
224
- Nothing -> all (_ > k) $ M .keys m
224
+ Nothing -> all (_ > k) ( M .keys m :: Array SmallKey )
225
225
Just { key: k1, value: v } -> let
226
226
isCloserKey k2 = k1 < k2 && k2 < k
227
227
isLTwhenEQexists = k1 < k && M .member k m
228
228
in k1 <= k
229
- && all (not <<< isCloserKey) (M .keys m)
229
+ && all (not <<< isCloserKey) (M .keys m :: Array SmallKey )
230
230
&& not isLTwhenEQexists
231
231
&& M .lookup k1 m == Just v
232
232
233
233
log " lookupGE result is correct"
234
234
quickCheck $ \k (TestMap m) -> case M .lookupGE k (smallKeyToNumberMap m) of
235
- Nothing -> all (_ < k) $ M .keys m
235
+ Nothing -> all (_ < k) ( M .keys m :: Array SmallKey )
236
236
Just { key: k1, value: v } -> let
237
237
isCloserKey k2 = k < k2 && k2 < k1
238
238
isGTwhenEQexists = k < k1 && M .member k m
239
239
in k1 >= k
240
- && all (not <<< isCloserKey) (M .keys m)
240
+ && all (not <<< isCloserKey) (M .keys m :: Array SmallKey )
241
241
&& not isGTwhenEQexists
242
242
&& M .lookup k1 m == Just v
243
243
244
244
log " lookupLT result is correct"
245
245
quickCheck $ \k (TestMap m) -> case M .lookupLT k (smallKeyToNumberMap m) of
246
- Nothing -> all (_ >= k) $ M .keys m
246
+ Nothing -> all (_ >= k) ( M .keys m :: Array SmallKey )
247
247
Just { key: k1, value: v } -> let
248
248
isCloserKey k2 = k1 < k2 && k2 < k
249
249
in k1 < k
250
- && all (not <<< isCloserKey) (M .keys m)
250
+ && all (not <<< isCloserKey) (M .keys m :: Array SmallKey )
251
251
&& M .lookup k1 m == Just v
252
252
253
253
log " lookupGT result is correct"
254
254
quickCheck $ \k (TestMap m) -> case M .lookupGT k (smallKeyToNumberMap m) of
255
- Nothing -> all (_ <= k) $ M .keys m
255
+ Nothing -> all (_ <= k) ( M .keys m :: Array SmallKey )
256
256
Just { key: k1, value: v } -> let
257
257
isCloserKey k2 = k < k2 && k2 < k1
258
258
in k1 > k
259
- && all (not <<< isCloserKey) (M .keys m)
259
+ && all (not <<< isCloserKey) (M .keys m :: Array SmallKey )
260
260
&& M .lookup k1 m == Just v
261
261
262
262
log " findMin result is correct"
263
263
quickCheck $ \(TestMap m) -> case M .findMin (smallKeyToNumberMap m) of
264
264
Nothing -> M .isEmpty m
265
- Just { key: k, value: v } -> M .lookup k m == Just v && all (_ >= k) (M .keys m)
265
+ Just { key: k, value: v } ->
266
+ M .lookup k m == Just v && all (_ >= k) (M .keys m :: Array SmallKey )
266
267
267
268
log " findMax result is correct"
268
269
quickCheck $ \(TestMap m) -> case M .findMax (smallKeyToNumberMap m) of
269
270
Nothing -> M .isEmpty m
270
- Just { key: k, value: v } -> M .lookup k m == Just v && all (_ <= k) (M .keys m)
271
+ Just { key: k, value: v } ->
272
+ M .lookup k m == Just v && all (_ <= k) (M .keys m :: Array SmallKey )
271
273
272
274
log " mapWithKey is correct"
273
275
quickCheck $ \(TestMap m :: TestMap String Int ) -> let
@@ -291,15 +293,15 @@ mapTests = do
291
293
292
294
log " filterKeys keeps those keys for which predicate is true"
293
295
quickCheck $ \(TestMap s :: TestMap String Int ) p ->
294
- A .all p (M .keys (M .filterKeys p s))
296
+ A .all p (M .keys (M .filterKeys p s) :: Array String )
295
297
296
298
log " filter gives submap"
297
299
quickCheck $ \(TestMap s :: TestMap String Int ) p ->
298
300
M .isSubmap (M .filter p s) s
299
301
300
302
log " filter keeps those values for which predicate is true"
301
303
quickCheck $ \(TestMap s :: TestMap String Int ) p ->
302
- A .all p (M .values (M .filter p s))
304
+ A .all p (M .values (M .filter p s) :: Array Int )
303
305
304
306
log " submap with no bounds = id"
305
307
quickCheck \(TestMap m :: TestMap SmallKey Int ) ->
0 commit comments