Solving type equations in multi-level specifications (preliminary version)

In rst-order algebraic speciication functions have types of the form s1 sn ! s0, where the si are type constants. Such types exclude higher-order and polymorphic functions. In multi-level algebraic speci-cation the structure of types used in function declarations is speciied as an algebraic data type. If only free constructors are used in the types used in function declarations, type assignment is an extension of the Hind-ley/Milner algorithm to multiple levels of types. By means of equations over types, sophisticated type systems can be modeled in a simple and uniform language. The type assignment for arbitrary multi-level specii-cations requires E-uniication. Although this is undecidable in general, it is decidable for restricted sets of equations. In an earlier paper, the modular applicative multi-level equational speciication formalism MLS is deened. The typechecker supports only free type constructors. In this paper we introduce multi-level speciication by means of a series of MLS examples and discuss the extension with an E-uniication procedure instead of syntactic uniication of the type assignment function for MLS such that it supports type deenitions, deened type operators and recursive types.