Skip to main content

Nested datatypes

  • Conference paper
  • First Online:
Mathematics of Program Construction (MPC 1998)

Part of the book series: Lecture Notes in Computer Science ((LNCS,volume 1422))

Included in the following conference series:

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.

This is a preview of subscription content, log in via an institution to check access.

Access this chapter

Institutional subscriptions

Preview

Unable to display preview. Download preview PDF.

Unable to display preview. Download preview PDF.

References

  1. R. Bird and O. de Moor. Algebra of Programming. International Series in Computing Science. Prentice Hall, 1996.

    Google Scholar 

  2. 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.

    Article  MathSciNet  MATH  Google Scholar 

  3. R.H. Connelly and F. Lockwood Morris. A generalisation of the trie data structure. Mathematical Structures in Computer Science, 5(3):381–418, 1995.

    Article  MathSciNet  MATH  Google Scholar 

  4. 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.

    Google Scholar 

  5. Paul Hoogendijk. A Generic theory of Data Types. Ph.D Thesis, Eindhoven University of Technology, 1997.

    Google Scholar 

  6. 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.

    Google Scholar 

  7. Peter Freyd. Algebraically complete categories. Springer-Verlag Lecture Notes in Mathematics, vol 1488, 95–104, 1990.

    MathSciNet  Google Scholar 

  8. 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.

    Google Scholar 

  9. J. Jeuring. Polytypic pattern matching. In S. Peyton Jones, editor, Functional Programming and Computer Architecture, pages 238–248. Association for Computing Machinery, 1995.

    Google Scholar 

  10. J. Lambek. A fixpoint theorem for complete categories. Mathematische Zeitschrift, 103:151–161, 1968.

    Article  MATH  MathSciNet  Google Scholar 

  11. Saunders Mac Lane. Categories for the Working Mathematician. Graduate Texts in Mathematics. Springer-Verlag, 1971.

    Google Scholar 

  12. G. Malcolm. Data structures and program transformation. Science of Computer Programming, 14(2–3):255–279, 1990.

    Article  MATH  MathSciNet  Google Scholar 

  13. G. Malcolm. Algebraic Data Types and Program Transformation. Ph.D thesis, University of Groningen, The Netherlands, 1990.

    Google Scholar 

  14. E.G. Manes and M.A. Arbib. Algebraic Approaches to Program Semantics. Texts and Monographs in Computing Science. Springer-Verlag, 1986.

    Google Scholar 

  15. 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.

    Google Scholar 

  16. 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.

    Google Scholar 

  17. A. Mycroft. Polymorphic type schemes and recursive definitions. In International Symposium on Programming, volume LNCS 167, pages 217–228. Springer-Verlag, 1984.

    Google Scholar 

  18. C. Okasaki. Purely Functional Data Structures. Ph.D thesis, School of Computer Science, Carnegie Mellon University, 1996.

    Google Scholar 

  19. 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.

    Google Scholar 

  20. S. Peyton Jones and J. Launchbury. Explicit quantification in Haskell. See: http://www.dcs.gla.ac.uk/people/personal/simonpj/.

    Google Scholar 

Download references

Author information

Authors and Affiliations

Authors

Editor information

Johan Jeuring

Rights and permissions

Reprints 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

Publish with us

Policies and ethics