Proposal: IntMap.differenceKeysSet for removing an IntSet of keys

Liyang HU at
Fri Jun 10 04:17:38 CEST 2011

On 10 June 2011 10:09, Felipe Almeida Lessa <felipe.lessa at> wrote:
> If we had something like fromIntSet :: IntSet -> IntMap ()
> then at least we could have a RULE to convert "difference m
> (fromIntSet s)" to "differenceIntSet m s".  Then we could just hide
> differenceIntSet and the name wouldn't matter.  Perhaps this
> "fromIntSet" function should be proposed as well?

Sure, that sounds quite reasonable. Have done that as patch 0005 on
the ticket. I've generalised it a bit to:

    fromSet :: (Key -> a) -> IntSet -> IntMap a

Which version does everyone prefer? differenceKeysSet m s, or
difference m (fromSet f s) ?


More information about the Libraries mailing list