Hostname: page-component-68c7f8b79f-r4j94 Total loading time: 0 Render date: 2026-01-10T17:33:29.384Z Has data issue: false hasContentIssue false

Type-safe run-time polytypic programming

Published online by Cambridge University Press:  28 February 2006

STEPHANIE WEIRICH
Affiliation:
Department of Computer and Information Science, University of Pennsylvania, Philadelphia, PA 19104, USA

Abstract

Core share and HTML view are not available for this content. However, as you have access to this content, a full PDF is available via the ‘Save PDF’ action button.

Polytypic programming is a way of defining type-indexed operations, such as map, fold and zip, based on type information. Run-time polytypic programming allows that type information to be dynamically computed – this support is essential in modern programming languages that support separate compilation, first-class type abstraction, or polymorphic recursion. However, in previous work we defined run-time polytypic programming with a type-passing semantics. Although it is natural to define polytypic programs as operating over first-class types, such a semantics suffers from a number of drawbacks. This paper describes how to recast that work in a type-erasure semantics, where terms represent type information in a safe manner. The resulting language is simple and easy to implement – we present a prototype implementation of the necessary machinery as a small Haskell library.

Information

Type
Article
Copyright
2006 Cambridge University Press
Submit a response

Discussions

No Discussions have been published for this article.