This makes it pos- sible for the implementer of the ADT to change the internals without affecting the clients. In effect, the implementer and client agree to an in- terface contract specifying how values of the type may be used. Ideally, this contract should be com- pletely expressible in our programming language so that the compiler can enforce it. By itself, this doesn't tell us how the various func- tions should behave. This implementation is not at all abstract.
Client can access and hence depend on internal representation of sets.
But the client of the type can still see inside a set by matching it against a pattern with the SET constructor. And the client can stil invent bogus sets by applying SET to arbitrary lists. The Set type now has no proper name at all. It turns out that we need a special language mech- anism to achieve the precise effect we want. This is the abstype declaration.