Abstract:
A polytypic function is a function that can be instantiated on many data types to obtain data type specific functionality. Examples of polytypic functions are the functions that can be derived in Haskell, such as show , read , and ` '. More advanced examples are functions for digital searching, pattern matching, unification, rewriting, and structure editing. For each of these problems, we not only have to define polytypic functionality, but also a type-indexed data type: a data type that is constructed in a generic way from an argument data type. For example, in the case of digital searching we have to define a search tree type by induction on the structure of the type of search keys. This paper shows how to define type-indexed data types, discusses several examples of type-indexed data types, and shows how to specialize type-indexed data types. The approach has been implemented in Generic Haskell, a generic programming extension of the functional language Haskell.
Citations
|
251
|
Foundations for Programming Languages
– Mitchell
- 1996
|
|
250
|
Functional programming with bananas, lenses, envelopes and barbed wire
– Meijer, Fokkinga, et al.
- 1991
|
|
242
|
Compiling polymorphism using intensional type analysis
– HARPER, MORRISETT
- 1995
|
|
147
|
Polyp - a polytypic programming language extension
– Jansson, Jeuring
- 1997
|
|
116
|
Type classes with functional dependencies
– Jones
- 2000
|
|
113
|
Intensional polymorphism in type erasure semantics
– Crary, Weirich, et al.
- 2002
|
|
104
|
Derivable Type Classes
– Hinze, Jones
- 2001
|
|
100
|
Data structures and program transformation
– Malcolm
- 1990
|
|
89
|
and Order in Algorithmics
– Law
- 1992
|
|
83
|
A new approach to generic functional programming
– Hinze
|
|
83
|
Polytypic values possess polykinded types. Science of computer programming
– Hinze
- 2002
|
|
77
|
Generic programming — an introduction
– Backhouse, Jansson, et al.
- 1999
|
|
67
|
Flexible type analysis
– Crary, Weirich
- 1999
|
|
43
|
The zipper
– Huet
- 1997
|
|
41
|
Fully reflexive intensional type analysis
– Trifonov, Saha, et al.
- 2000
|
|
36
|
Extensional polymorphism
– Dubois, Rouaix, et al.
- 1995
|
|
36
|
Encoding types in ML-like languages
– Yang
- 1998
|
|
29
|
Encoding intensional type analysis
– Weirich
- 2001
|
|
28
|
Generic programs and proofs
– Hinze
|
|
28
|
Polytypic pattern matching
– Jeuring
- 1995
|
|
25
|
An investigation of a programming language with a polymorphic type structure
– McCracken
- 1979
|
|
22
|
Generalizing generalized tries
– Hinze
|
|
19
|
More types for nested data parallel programming
– Chakravarty, Keller
- 2000
|
|
16
|
Oege de Moor, and Paul Hoogendijk. Generic functional programming with types and relations
– Bird
|
|
16
|
The derivative of a regular type is its type of one-hole contexts. Unpublished manuscript
– McBride
- 2001
|
|
16
|
Polytypic downwards accumulations
– Gibbons
- 1998
|
|
15
|
Format Evolution
– Lämmel, Lohmann
- 2001
|
|
12
|
Typed logical variables in Haskell
– Claessen, Ljunglof
- 2000
|
|
12
|
PolyLib – a polytypic function library
– Jansson, Jeuring
- 1998
|
|
12
|
A framework for polytypic programming on terms, with an application to rewriting
– Jansson, Jeuring
- 2000
|
|
11
|
Functional pearl: Polytypic unification
– Jansson, Jeuring
- 1998
|
|
5
|
The WWW home page for polytypic programming. Available from http://www.cs.chalmers.se/~patrikj/poly
– Jansson
- 2001
|
|
5
|
Genetic algorithms in Haskell with polytypic programming. Examensarbeten 1997:36
– Vestin
- 1997
|
|
5
|
A technical overview of Generic Haskell
– Wit
- 2002
|
|
4
|
Functional pearl: Polytypic uni
– Jansson, Jeuring
- 1998
|
|
1
|
Fully re type analysis
– Trifonov, Saha, et al.
- 2000
|