
kahl@cas.mcmaster.ca wrote:
Me neither...
How about:
-- intended for |qualified| import |as Ord|: newtype Dual a = Dual { unDual :: a } deriving Eq
In my opinion "dual" is even worse: - "dual" is not a name that people think about when they want something sorted in descending order or they want a different priority queue, etc. I think of names like "reverse", "descending" and "something to do with order". - "dual" can mean many more things. First of all there are different dualities in mathematics, I guess this refers to the categorical dual. Then there are many ways to use that duality in Haskell. The first thing that comes to mind, and which is a closer fit, is newtype Op t a b = Op (t b a), the dual of a Control.Category style category. Twan