Go backward to Existential QuantificationGo up to TopGo forward to Use of Packages |

- 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)

- x:
- 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