
That's right. If you had another instance of Ord for a newtype with
compare = flip compare, and were allowed to coerce the keys, you can
break it.
On Thu, Mar 13, 2014 at 5:00 PM, Andres Löh
[Sorry for the self-reply.]
Oh, perhaps I actually understand this:
Please forgive my ignorance w.r.t. roles, but why aren't all of these representational?
Map k v -- k: nominal, v: represententional Set a -- k: nominal
AFAIK both Map and Set are "normal" datatypes. Not GADTs, no type families involved. Why would anything need to be "nominal" then?
Is this because the integrity of these types relies on the Ord instance being sane, and a newtype could have a different Ord instance defined?
Cheers, Andres _______________________________________________ Libraries mailing list Libraries@haskell.org http://www.haskell.org/mailman/listinfo/libraries
-- Regards, Austin Seipp, Haskell Consultant Well-Typed LLP, http://www.well-typed.com/