|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
ABSTRACT
Generic values are type-indexed values defined over the structure of types. A popular and pragmatic approach to type-indexed values in ML-like languages is to use a value-dependent encoding,where the type representations carry the values being indexed. Unfortunately, the approach has a major drawback. Because the resulting encoding is specific to a particular set of values, extending an encoding with new values requires modifying it.In this paper, we discuss an approach to generics based on the value-dependent encoding approach. We extend upon previous work inseveral ways. We present a technique that allows an existing value-dependent encoding to be extended with new values. We show how toencode type representations over essentially all the ML-types. We also show how to compute fixed points over arbitrary products. Our techniques have been implemented in Standard ML, do not compromise abstraction, and require only a fixed number of combinators. REFERENCES
Note: OCR errors may be found in this Reference List extracted from the full text article. ACM has opted to expose the complete List rather than only correct and linked references.
INDEX TERMS
Primary Classification:
Additional Classification:
General Terms:
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||