Sciweavers

POPL
2005
ACM

Associated types with class

15 years 22 days ago
Associated types with class
Haskell's type classes allow ad-hoc overloading, or typeindexing, of functions. A natural generalisation is to allow type-indexing of data types as well. It turns out that this ectly supports a powerful form of abstraction called associated types, which are available in C++ using traits classes. Associated types are useful in many applications, especially for self-optimising libraries that adapt their data representations and algorithms in a type-directed manner. In this paper, we introduce and motivate associated types as a rather natural generalisation of Haskell's existing type classes. Formally, we present a type system that includes a type-directed translation into an explicitly typed target language akin to System F; the existence of this translation ensures that the addition of associated data types to an existing Haskell compiler only requires changes to the front end. Categories and Subject Descriptors: D.3.3 Programming Languages: Language Constructs and Features G...
Manuel M. T. Chakravarty, Gabriele Keller, Simon L
Added 03 Dec 2009
Updated 03 Dec 2009
Type Conference
Year 2005
Where POPL
Authors Manuel M. T. Chakravarty, Gabriele Keller, Simon L. Peyton Jones, Simon Marlow
Comments (0)