Add whenMissing, which takes user-supplied fns#1185
Add whenMissing, which takes user-supplied fns#1185meooow25 wants to merge 1 commit intohaskell:masterfrom
Conversation
This allows for some useful applications which are currently not possible with the non-internal API. The functions carry a warning that the two input functions are related by a law and the user is responsible for satisfying it. Export filterA for Set, now that it is referred to from whenMissing.
|
I decided to go with the simple approach from #1054. Just a note that I haven't added this function to the |
|
This makes me pretty nervous. One of the major reasons I wrote the new merge interface was to get away from the earlier approach with pretty complex preconditions on user-passed arguments. |
|
The motivation here is that it is actually useful to allow this, e.g. to calculate union and intersection at once (#944). An analogy might be The alternative would be to tell people that they need to use the internal module to do what they want to do. The functionality is less discoverable and has less stability guarantees. |
|
The representation of |
|
@treeowl did you get a chance to look at the examples? |
This allows for some useful applications which are currently not possible with the non-internal API. The functions carry a warning that the two input functions are related by a law and the user is responsible for satisfying it.
Export filterA for Set, now that it is referred to from whenMissing.
Closes #1054