A Down newtype in Data.Ord?

wren ng thornton wren at freegeek.org
Tue Nov 22 04:04:39 CET 2011

On 11/21/11 10:23 AM, Edward Kmett wrote:
> I have to admit I don't like this color for the same reason as my dislike of the Opposite and Dual suggestions. It isn't entirely clear which operator is being reversed, so you can call me a -1.

Would Converse be any clearer?

The ambiguity of what's being inverted is the reason why I'm not a fan 
of Inverse (e.g., we invert multiplication all the time, to the point 
where we abuse notation and say we're inverting the numbers themselves). 
But other than Reverse and Converse, I can't think of any name that 
would immediately invoke the idea that the ordering relation is what's 
being dualized. Unless we go the Java route and choose something verbose 
like ReverseOrdering (or decide to be really perverse and choose CoOrd). 
But really, what else can be reversed? Sorting and ordering functions 
can have their outputs reversed. Whereas relations in general are 
conversed, binary operators are commuted, arguments to functions are 
flipped, components of pairs are swapped,...

Live well,

More information about the Libraries mailing list