|Version 1 (modified by 11 years ago) (diff),|
Associated types are data type and type synonym declarations in type classes. They are useful to denote type-indexed data types (i.e., generic programming) and functions over types. Applications include the typical applications of functional dependencies, but also self-optimising libraries and APIs that resemble ML module signatures.
- Associated Types with Class by Manuel M. T. Chakravarty, Gabriele Keller, Simon Peyton Jones, and Simon Marlow, in POPL'05.
- Associated Type Synonyms by Manuel M. T. Chakravarty, Gabriele Keller, and Simon Peyton Jones, in ICFP'05.
- phrac (Darcs repo) is a prototype implementation of HM type inference with ATs.
- Associated types are a functional alternative to FunctionalDependencies, which are actually relational. (Why use relational programming on the value level if we don't do it on the value level?)
- They avoid some problems with FDs (described in the above papers).
- They closes the gap reported in A comparative study of language support for generic programming
- Only a prototype implementation so far