This type is what I would like (and is the proper generalization of the proposed function), but I don't know if it's feasible. It might fit into Alternative, but it may need a separate class. I don't see how it could be written as a standalone function without extra support. So I suggested a "next best thing. " As to flooding, I thought this was germane to the proposal, and I do apologize if others disagree. I just don't think ?. is useful or general enough to deserve a place in base. On Oct 12, 2013 4:20 PM, "Niklas Hambüchen" <mail@nh2.me> wrote:
Yes, I understand
|> :: Alternative f => f a -> a -> a
as what you are asking for, for an Alternative that can default to something.
Back to your suggestion, I personally find a written-out `fromMaybe` nicer syntax, especially because it fits well into the naming of the other `from...` functions, and the fact that the value comes from a maybe suggests to me that I have to give a defaul there. _______________________________________________ Libraries mailing list Libraries@haskell.org http://www.haskell.org/mailman/listinfo/libraries