Skip to content

Commit a09b16e

Browse files
Generalise types
1 parent 91d57e9 commit a09b16e

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

src/Data/Map/Internal.purs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -615,7 +615,7 @@ unions = foldl union empty
615615

616616
-- | Difference of two maps. Return elements of the first map where
617617
-- | the keys do not exist in the second map.
618-
difference :: forall k v. Ord k => Map k v -> Map k v -> Map k v
618+
difference :: forall k v w. Ord k => Map k v -> Map k w -> Map k v
619619
difference m1 m2 = foldl (flip delete) m1 (keys m2)
620620

621621
-- | Test whether one map contains all of the keys and values contained in another map

test/Test/Data/Map.purs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -217,7 +217,7 @@ mapTests = do
217217

218218
log "difference"
219219
quickCheck $ \(TestMap m1) (TestMap m2) ->
220-
let d = M.difference m1 m2 :: M.Map SmallKey Int
220+
let d = M.difference (m1 :: M.Map SmallKey Int) (m2 :: M.Map SmallKey String)
221221
in and (map (\k -> M.member k m1) (A.fromFoldable $ M.keys d)) &&
222222
and (map (\k -> not $ M.member k d) (A.fromFoldable $ M.keys m2))
223223

0 commit comments

Comments
 (0)