Go backward to
Existential Quantification
Go up to
Top
Go forward to
Use of Packages
Information Hiding
Abstract
types:
Unknown type representation.
Packaged with operations that may be applied to type.
Another example:
x:
exists
a. {const: a, op: a
->
Int}
x.op(x.const)
Restrict use of abstract types:
Simplify type checking.
value p:
exists
a. a x (a
->
Int)
= pack[a = Int in a x (a
->
Int)](3, succ)
Value p is a
package
Type a x (a
->
Int) is the
interface
.
Binding a=Int is the type
representation
.
General form:
pack [a = typerep in interface](contents)
Author:
Wolfgang Schreiner
Last Modification: May 27, 1998