Skip to content

Add whenMissing, which takes user-supplied fns#1185

Open
meooow25 wants to merge 1 commit intohaskell:masterfrom
meooow25:whenmissing
Open

Add whenMissing, which takes user-supplied fns#1185
meooow25 wants to merge 1 commit intohaskell:masterfrom
meooow25:whenmissing

Conversation

@meooow25
Copy link
Contributor

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

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.
@meooow25
Copy link
Contributor Author

I decided to go with the simple approach from #1054.

Just a note that I haven't added this function to the Merge.Strict modules, since I cannot think of a situation where we would also need to force the values.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Can we make the Map.Merge API more expressive?

1 participant