Skip to main content

Private Row Types: Abstracting the Unnamed

  • Conference paper

Part of the Lecture Notes in Computer Science book series (LNPSE,volume 4279)

Abstract

In addition to traditional record and variant types, Objective Caml has structurally polymorphic types, for objects and polymorphic variants. These types allow new forms of polymorphic programming, but they have a limitation when used in combination with modules: there is no way to abstract their polymorphism in a signature. Private row types remedy this situation: they are manifest types whose “row-variable” is left abstract, so that an implementation may instantiate it freely. They have useful applications even in the absence of functors. Combined with recursive modules, they provide an original solution to the expression problem.

Keywords

  • Object Type
  • Polymorphic Variant
  • Functional Programming
  • Type Inference
  • Abstract Type

These keywords were added by machine and not by the authors. This process is experimental and the keywords may be updated as the learning algorithm improves.

This is a preview of subscription content, access via your institution.

Buying options

Chapter
USD   29.95
Price excludes VAT (Canada)
  • Available as PDF
  • Read on any device
  • Instant download
  • Own it forever
eBook
USD   39.99
Price excludes VAT (Canada)
  • Available as PDF
  • Read on any device
  • Instant download
  • Own it forever
Softcover Book
USD   54.99
Price excludes VAT (Canada)
  • Compact, lightweight edition
  • Dispatched in 3 to 5 business days
  • Free shipping worldwide - see info

Tax calculation will be finalised at checkout

Purchases are for personal use only

Learn about institutional subscriptions

Preview

Unable to display preview. Download preview PDF.

Unable to display preview. Download preview PDF.

References

  1. Rémy, D., Vouillon, J.: Objective ML: An effective object-oriented extension to ML. Theory and Practice of Object Systems 4, 27–50 (1998)

    CrossRef  Google Scholar 

  2. Garrigue, J.: Programming with polymorphic variants. In: ML Workshop, Baltimore (1998)

    Google Scholar 

  3. Wadler, P.: The expression problem. Java Genericity mailing list (1998), http://www.daimi.au.dk/~madst/tool/papers/expression.txt

  4. Garrigue, J.: Code reuse through polymorphic variants. In: Workshop on Foundations of Software Engineering, Sasaguri, Japan (2000), http://www.math.nagoya-u.ac.jp/~garrigue/papers/fose2000.html

  5. Rémy, D., Garrigue, J.: On the expression problem (2004), http://pauillac.inria.fr/~remy/work/expr/

  6. Ohori, A.: A polymorphic record calculus and its compilation. ACM Transactions on Programming Languages and Systems 17, 844–895 (1995)

    CrossRef  Google Scholar 

  7. Canning, P., Cook, W., Hill, W., Olthoff, W., Mitchell, J.C.: F-bounded polymorphism for object-oriented programming. In: Proc. ACM Symposium on Functional Programming and Computer Architectures, pp. 273–280 (1989)

    Google Scholar 

  8. Bracha, G., Odersky, M., Stoutamire, D., Wadler, P.: Making the future safe for the past: Adding genericity to the Java programming language. In: Proc. ACM Symposium on Object Oriented Programming, Systems, Languages and Applications (1998)

    Google Scholar 

  9. Fisher, K., Reppy, J.: The design of a class mechanism for Moby. In: Proc. ACM Conference on Programming Language Design and Implementation (1999)

    Google Scholar 

  10. Odersky, M., Crémet, V., Röckl, C., Zenger, M.: A nominal theory of objects with dependent types. In: Proc. European Conference on Object-Oriented Programming (2003)

    Google Scholar 

  11. Zenger, M., Odersky, M.: Independently extensible solutions to the expression problem. In: Workshop on Foundations of Object-Oriented Languages (2005)

    Google Scholar 

  12. Boulmé, S., Hardin, T., Rioboo, R.: Polymorphic data types, objects, modules and functors: is it too much? RR 014, LIP6, Université Paris 6 (2000)

    Google Scholar 

  13. Zenger, M., Odersky, M.: Extensible algebraic datatypes with defaults. In: Proc. ACM International Conference on Functional Programming, pp. 241–252 (2001)

    Google Scholar 

  14. Leroy, X., Doligez, D., Garrigue, J., Rémy, D., Vouillon, J.: The Objective Caml system release 3.09, Documentation and user’s manual. Projet Cristal, INRIA (2005)

    Google Scholar 

  15. Vouillon, J.: Combining subsumption and binary methods: an object calculus with views. In: Proc. ACM Symposium on Principles of Programming Languages, pp. 290–303 (2001)

    Google Scholar 

  16. Rémy, D.: Type inference for records in a natural extension of ML. In: Gunter, C.A., Mitchell, J.C. (eds.) Theoretical Aspects Of Object-Oriented Programming. Types, Semantics and Language Design. MIT Press, Cambridge (1993)

    Google Scholar 

  17. Garrigue, J., Aït-Kaci, H.: The typed polymorphic label-selective λ-calculus. In: Proc. ACM Symposium on Principles of Programming Languages, pp. 35–47 (1994)

    Google Scholar 

  18. Leroy, X.: A modular module system. Journal of Functional Programming 10, 269–303 (2000)

    CrossRef  MATH  Google Scholar 

  19. Garrigue, J.: Simple type inference for structural polymorphism. In: Workshop on Foundations of Object-Oriented Languages, Portland, Oregon (2002)

    Google Scholar 

  20. Leroy, X.: Applicative functors and fully transparent higher-order modules. In: Proc. ACM Symposium on Principles of Programming Languages, pp. 142–153 (1995)

    Google Scholar 

  21. Ramsey, N., Fisher, K., Govereau, P.: An expressive language of signatures. In: Proc. ACM International Conference on Functional Programming (2005)

    Google Scholar 

  22. Crary, K., Harper, R., Puri, S.: What is a recursive module? In: Proc. ACM Conference on Programming Language Design and Implementation, pp. 50–63 (1999)

    Google Scholar 

  23. Russo, C.V.: Recursive structures for Standard ML. In: Proc. ACM International Conference on Functional Programming, pp. 50–61 (2001)

    Google Scholar 

  24. Nakata, K., Garrigue, J.: Recursive modules for programming. In: Proc. ACM International Conference on Functional Programming, Portland, Oregon (2006)

    Google Scholar 

Download references

Author information

Authors and Affiliations

Authors

Editor information

Editors and Affiliations

Rights and permissions

Reprints and Permissions

Copyright information

© 2006 Springer-Verlag Berlin Heidelberg

About this paper

Cite this paper

Garrigue, J. (2006). Private Row Types: Abstracting the Unnamed. In: Kobayashi, N. (eds) Programming Languages and Systems. APLAS 2006. Lecture Notes in Computer Science, vol 4279. Springer, Berlin, Heidelberg. https://doi.org/10.1007/11924661_3

Download citation

  • DOI: https://doi.org/10.1007/11924661_3

  • Publisher Name: Springer, Berlin, Heidelberg

  • Print ISBN: 978-3-540-48937-5

  • Online ISBN: 978-3-540-48938-2

  • eBook Packages: Computer ScienceComputer Science (R0)

Publish with us

Policies and ethics