## Polytypic Programming With Ease (1999)

### Cached

### Download Links

- [www.informatik.uni-bonn.de]
- [www.cs.bonn.edu]
- [www.informatik.uni-bonn.de]
- DBLP

### Other Repositories/Bibliography

Citations: | 13 - 5 self |

### BibTeX

@MISC{Hinze99polytypicprogramming,

author = {Ralf Hinze},

title = {Polytypic Programming With Ease},

year = {1999}

}

### OpenURL

### Abstract

A functional polytypic program is one that is parameterised by datatype. Since polytypic functions are defined by induction on types rather than by induction on values they typically operate on a higher level of abstraction than their monotypic counterparts. However, polytypic programming is not necessarily more complicated than conventional programming. We show that a polytypic function is uniquely defined by its action on constant functors, projection functors, sums, and products. This information is sufficient to specialize a polytypic function to arbitrary polymorphic datatypes, including mutually recursive datatypes and nested datatypes. The key idea is to use infinite trees as index sets for polytypic functions and to interpret datatypes as algebraic trees. This approach appears both to be simpler, more general, and more efficient than previous ones which are based on the initial algebra semantics of datatypes. Polytypic functions enjoy polytypic properties. We show that well-kno...