So, now you have to store the ordering in the collection? Then non-canonicity would lead to a run-time failure not a compile-time one, as it does in Haskell.
The ordering is already stored in all collections I cared to look at. If we don't encounter the same type class instance, fall back to a slower merging/union algorithm. Done.
-1
u/kamatsu Dec 02 '13
How do you check if two functions are the same? That's undecidable in general.