@MISC{Figueiredo99modularand, author = {Lucília Figueiredo and Carlos Camarão}, title = {Modular and Extensible Types}, year = {1999} }
Bookmark
OpenURL
Abstract
This paper presents a type declaration construct which provides either a type synonym, a datatype, an abstract type, an abstract type with views, a subtype of an existing type, or a module (collection of declarations) . It supports the denition of views for an abstract type, allowing pattern-matching on values of abstract types. The presentation of the proposed construct is based on several illustrative examples. The combination of separate constructs into a single one has lead to an exploration of subtyping, with the distinction between concrete subtyping and abstract subtyping . Concrete subtyping can be based on an explicit rule for each type constructor, as usual, or on overloading of type constructors. Abstract subtyping is based either on: i) restriction of the set of values of the parent type through the use of constructor functions, or extension of the functionality of the parent type by modifying or providing new transformer or reader functions, or ii) on concrete subtyping ...