
17 Sep
2009
17 Sep
'09
11:10 a.m.
Edward Kmett
While I like the generic version of filter, and have written one myself, I am somewhat concerned about the fact that Control.Monad is probably the module most often imported unqualified and without an explicit import list due to the sheer number of combinators that it provides and filter is a very commonly used function in the Prelude. Adding the generic version of filter with the same name to such a module will likely break a good deal of code.
I don't think it would break the code as such: it does exactly the same thing. It would break the import declarations, though.
Jon's suggestion of mfilter (filterM?)
Definitely mfilter. filterM is there already, and does what its name implies. See proposal #3524. Jón