Abstract
A nested datatype, also known as a non-regular datatype, is a parametrised datatype whose declaration involves different instances of the accompanying type parameters. Nested datatypes have been mostly ignored in functional programming until recently, but they are turning out to be both theoretically important and useful in practice. The aim of this paper is to suggest a functorial semantics for such datatypes, with an associated calculational theory that mirrors and extends the standard theory for regular datatypes. Though elegant and generic, the proposed approach appears more limited than one would like, and some of the limitations are discussed.
Preview
Unable to display preview. Download preview PDF.
References
R. Bird and O. de Moor. Algebra of Programming. International Series in Computing Science. Prentice Hall, 1996.
R. S. Bird, P. F. Hoogendijk, and O. De Moor. Generic programming with relations and functors. Journal of Functional Programming, 6(1):1–28, 1996.
R.H. Connelly and F. Lockwood Morris. A generalisation of the trie data structure. Mathematical Structures in Computer Science, 5(3):381–418, 1995.
Oege de Moor and Paul Hoogendijk. What is a datatype? Technical Report 96/16, Department of Maths and Computing Science, Eindhoven University of Technology, 1996.
Paul Hoogendijk. A Generic theory of Data Types. Ph.D Thesis, Eindhoven University of Technology, 1997.
L. Fegaras and T. Sheard. Revisiting catamorphisms over datatypes with embedded functions. In 23rd ACM SIGPLAN-SIGACT Symposium on Principles of Programming Languages. Association for Computing Machinery, 1996.
Peter Freyd. Algebraically complete categories. Springer-Verlag Lecture Notes in Mathematics, vol 1488, 95–104, 1990.
T. Hagino. Category theoretic approach to data types. PhD thesis, Laboratory for Foundations of Computer Science, University of Edinburgh, UK, 1987. Technical Report ECS-LFCS-87-38.
J. Jeuring. Polytypic pattern matching. In S. Peyton Jones, editor, Functional Programming and Computer Architecture, pages 238–248. Association for Computing Machinery, 1995.
J. Lambek. A fixpoint theorem for complete categories. Mathematische Zeitschrift, 103:151–161, 1968.
Saunders Mac Lane. Categories for the Working Mathematician. Graduate Texts in Mathematics. Springer-Verlag, 1971.
G. Malcolm. Data structures and program transformation. Science of Computer Programming, 14(2–3):255–279, 1990.
G. Malcolm. Algebraic Data Types and Program Transformation. Ph.D thesis, University of Groningen, The Netherlands, 1990.
E.G. Manes and M.A. Arbib. Algebraic Approaches to Program Semantics. Texts and Monographs in Computing Science. Springer-Verlag, 1986.
Lambert Meertens. Calculate polytypically! In Herbert Kuchen and S. Doaitse Swierstra, editors, Programming Languages: Implementations Logics, and Programs Proceedings Eighth International Symposium PLILP '96, volume 1140 of LNCS, pages 1–16. Springer-Verlag, 1996.
E. Meijer and G. Hutton. Bananas in space: extending fold and unfold to exponential types. In S. Peyton Jones, editor, Functional Progamming Languages and Computer Architecture, pages 324–333. Association for Computing Machinery, 1995.
A. Mycroft. Polymorphic type schemes and recursive definitions. In International Symposium on Programming, volume LNCS 167, pages 217–228. Springer-Verlag, 1984.
C. Okasaki. Purely Functional Data Structures. Ph.D thesis, School of Computer Science, Carnegie Mellon University, 1996.
C. Okasaki. Catenable double-ended queues. In Proceedings of the 1997 ACM SIGPLAN International Conference on Functional Programming (ICFP '97), pages 66–74. ACM, 1997.
S. Peyton Jones and J. Launchbury. Explicit quantification in Haskell. See: http://www.dcs.gla.ac.uk/people/personal/simonpj/.
Author information
Authors and Affiliations
Editor information
Rights and permissions
Copyright information
© 1998 Springer-Verlag Berlin Heidelberg
About this paper
Cite this paper
Bird, R., Meertens, L. (1998). Nested datatypes. In: Jeuring, J. (eds) Mathematics of Program Construction. MPC 1998. Lecture Notes in Computer Science, vol 1422. Springer, Berlin, Heidelberg. https://doi.org/10.1007/BFb0054285
Download citation
DOI: https://doi.org/10.1007/BFb0054285
Published:
Publisher Name: Springer, Berlin, Heidelberg
Print ISBN: 978-3-540-64591-7
Online ISBN: 978-3-540-69345-1
eBook Packages: Springer Book Archive