Skip to main contentSkip to search
Episciences
Open Access Journals
Sign in(new window)
Discrete Mathematics & Theoretical Computer Science logo
Discrete Mathematics & Theoretical Computer Science
Discrete Mathematics & Theoretical Computer Science logo
Discrete Mathematics & Theoretical Computer Science
Sign in(new window)
Articles & Issues
All articlesAll accepted articlesAll volumesLast volumeSectionsSpecial issuesAuthors
About
The journalIndexing
Boards
Publish
For authorsEthical charter
Submit
Discrete Mathematics & Theoretical Computer Science logo
Contact
|
Credits
eISSN 1365-8050
|
RSS
|
Atom
Episciences
Documentation
|
Acknowledgements
|
Publishing policy
Accessibility: non-compliant
|
Legal mentions
|
Privacy statement
|
Terms of use
  1. Home > Articles & Issues >
  2. Articles >
  3. Polytypic Functions ...
Article

Polytypic Functions Over Nested Datatypes

Ralf Hinze (1)
(1) Institut für Informatik III [Bonn]
Download article
Open on HAL
Imported on
March 26, 2015
Published on
January 1, 1999
Last modified on
March 31, 2025
Volume 3
vol. 3:4
DOI
10.46298/dmtcs.266
License
https://about.hal.science/hal-authorisation-v1
Indicators
694
Views
727
Downloads

Polytypic Functions Over Nested Datatypes

Ralf Hinze (1)
(1) Institut für Informatik III [Bonn]
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.
Keywords
  • [INFO.INFO-DM]Computer Science [cs]/Discrete Mathematics [cs.DM]
  • Functional programming
  • generic programming
  • nested datatypes
  • rational trees
  • reductions.
  • reductions
Cited by

Source: OpenCitations

  • Polytypic Programming With Ease

    Lecture notes in computer science

    Authors : Ralf Hinze ORCID

    Journal reference : Volume 1722, 1999, pp. 21-36

    DOI : 10.1007/10705424_2
  • Polytypic values possess polykinded types

    Science of Computer Programming

    Authors : Ralf Hinze ORCID

    Journal reference : Volume 43, 2002, pp. 129-159

    DOI : 10.1016/s0167-6423(02)00025-4
Preview
Loading PDF preview...