Polytypic Functions Over Nested Datatypes

Abstract : The theory and practice of polytypic programming is intimately connected with the initial algebra semantics of datatypes. This is both a blessing and a curse. It is a blessing because the underlying theory is beautiful and well developed. It is a curse because the initial algebra semantics is restricted to so-called regular datatypes. Recent work by R. Bird and L. Meertens [3] on the semantics of non-regular or nested datatypes suggests that an extension to general datatypes is not entirely straightforward. Here we propose an alternative that extends polytypism to arbitrary datatypes, including nested datatypes and mutually recursive datatypes. The central idea is to use rational trees over a suitable set of functor symbols as type arguments for polytypic functions. Besides covering a wider range of types the approach is also simpler and technically less involving than previous ones. We present several examples of polytypic functions, among others polytypic reduction and polytypic equality. The presentation assumes some background in functional and in polytypic programming. A basic knowledge of monads is required for some of the examples.
Type de document :
Article dans une revue
Discrete Mathematics and Theoretical Computer Science, DMTCS, 1999, 3 (4), pp.193-214
Liste complète des métadonnées

Littérature citée [23 références]  Voir  Masquer  Télécharger

https://hal.inria.fr/hal-00958938
Contributeur : Service Ist Inria Sophia Antipolis-Méditerranée / I3s <>
Soumis le : jeudi 13 mars 2014 - 16:48:04
Dernière modification le : mercredi 29 novembre 2017 - 10:26:19
Document(s) archivé(s) le : vendredi 13 juin 2014 - 12:02:13

Fichier

dm030407.pdf
Fichiers produits par l'(les) auteur(s)

Identifiants

  • HAL Id : hal-00958938, version 1

Collections

Citation

Ralf Hinze. Polytypic Functions Over Nested Datatypes. Discrete Mathematics and Theoretical Computer Science, DMTCS, 1999, 3 (4), pp.193-214. 〈hal-00958938〉

Partager

Métriques

Consultations de la notice

67

Téléchargements de fichiers

276