All internals of the implementation are visible to programmers who use the type.

Features of Abstract Data Types

Implemented with the class system or module system in Haskell.

Internal implementation details hidden from user.
Constructors are hidden and no pattern matching is available.

Access to data type is through "methods" or "operators"

The exact types of the "methods" or operators is exposed in a signature.

Supports multiple implementations.

Operational semantics is described by an axiomatic specification. All actual implementations
must meet the specification (behave correctly) but are free to choose any implementation.

Components of Abstract Data Types

Abtsratc data types are often described as having severaol components

A data type or types

A set of operations

A specification

A signature

A set of axioms

A set of implementation

Signatures

A Signature is a set of contracts (or types)
that the operation of the abstract data type must export
(i.e. provide implementations for). In some systems
the signature also includes axioms that all
implementations must obey.

Examples

Stack

push :: a -> Stack a -> Stack a
top :: Stack a -> a
pop :: Stack a -> Stack a
emptyStack:: Stack a
empty :: Stack a -> Bool

The Stack() means that the the type Stack is exported, but the constructors
are not exported.

Algebraic Specification

An algebraic specification describes how an implementation should behave.
It is generally written as a set of equivalencies. I.e. equations that
state that two programs are equal. Normally equality between programs
is described in terms of observational equivalence.

Two programs are observational equivalent if there are no program
contexts that can distinguish them. A context is an additional
set of commands or expressions surrounding the programs.

In terms of abstract data types contexts are often described as a series of
calls to the operations or methods of the abstract type.

In a pure implementation, observational equivalence means
two program fragments can be switched for one another and no
program could tell the difference.

In a command based implementation, observational equivalence
usually means that the sequence of updates to variables is such that
for any starting set of values of the variables, the end set of values
is the same.