| The problem, I think, stems from the need for *efficient implementation*
| which has unfortunately totally destroyed the abstraction.
You're quite right of course. Actually there's a hierarchy of increasingly
constrained implementations
sets with element equality only
sets with element (total) ordering
sets with element hashing (ie the ability to map an elt onto
a bounded integer range)
All this applies to finite maps too, of course (ie you can get away with
equality only if you are prepared to pay in efficiency).
GHC's module should probably be called OrdSet or something. Alistair Reid
is working on (the specification of) a serious blob of standard libraries
for Haskell, and I believe he's taking all this into account.
Simon