Ticket #5242 (closed feature request: wontfix)
IntMap.differenceKeysSet for removing an IntSet of keys
| Reported by: | liyang | Owned by: | fox@… |
|---|---|---|---|
| Priority: | normal | Milestone: | 7.6.1 |
| Component: | libraries (other) | Version: | 7.1 |
| Keywords: | containers | Cc: | hackage.haskell.org@…, johan.tibell@… |
| Operating System: | Unknown/Multiple | Architecture: | Unknown/Multiple |
| Type of failure: | None/Unknown | Difficulty: | |
| Test Case: | Blocked By: | ||
| Blocking: | Related Tickets: |
Description
Currently, IntMap.difference ma mb removes all the keys in mb from ma, where the elements of the two IntMaps can be of different types; the elements of mb are not used.
There is no efficient way to remove an IntSet of keys, however. These patches adds the IntMap.differenceKeysSet function—essentially a copy/paste of difference—that satisfies the following property:
prop_DiffKeysSet :: Map Int -> Map () -> Bool prop_DiffKeysSet t1 t2 = difference t1 t2 == differenceKeysSet t1 (keysSet t2)
Attachments
Change History
Note: See
TracTickets for help on using
tickets.

