Skip to content

Commit

Permalink
fix KeyMap.union doc
Browse files Browse the repository at this point in the history
  • Loading branch information
ncfavier authored and phadej committed Oct 4, 2023
1 parent 43876c4 commit b9edcea
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/Data/Aeson/KeyMap.hs
Original file line number Diff line number Diff line change
Expand Up @@ -268,7 +268,7 @@ toAscList = M.toAscList . unKeyMap
difference :: KeyMap v -> KeyMap v' -> KeyMap v
difference tm1 tm2 = KeyMap (M.difference (unKeyMap tm1) (unKeyMap tm2))

-- The (left-biased) union of two maps. It prefers the first map when duplicate
-- | The (left-biased) union of two maps. It prefers the first map when duplicate
-- keys are encountered, i.e. ('union' == 'unionWith' 'const').
union :: KeyMap v -> KeyMap v -> KeyMap v
union (KeyMap x) (KeyMap y) = KeyMap (M.union x y)
Expand Down Expand Up @@ -477,7 +477,7 @@ toAscList = sortBy (comparing fst) . toList
difference :: KeyMap v -> KeyMap v' -> KeyMap v
difference tm1 tm2 = KeyMap (H.difference (unKeyMap tm1) (unKeyMap tm2))

-- The (left-biased) union of two maps. It prefers the first map when duplicate
-- | The (left-biased) union of two maps. It prefers the first map when duplicate
-- keys are encountered, i.e. ('union' == 'unionWith' 'const').
union :: KeyMap v -> KeyMap v -> KeyMap v
union (KeyMap x) (KeyMap y) = KeyMap (H.union x y)
Expand Down

0 comments on commit b9edcea

Please sign in to comment.