Advertisement

Private Row Types: Abstracting the Unnamed

  • Jacques Garrigue
Conference paper
Part of the Lecture Notes in Computer Science book series (LNCS, 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.

Preview

Unable to display preview. Download preview PDF.

Unable to display preview. Download preview PDF.

References

  1. 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)CrossRefGoogle Scholar
  2. 2.
    Garrigue, J.: Programming with polymorphic variants. In: ML Workshop, Baltimore (1998)Google Scholar
  3. 3.
    Wadler, P.: The expression problem. Java Genericity mailing list (1998), http://www.daimi.au.dk/~madst/tool/papers/expression.txt
  4. 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. 5.
    Rémy, D., Garrigue, J.: On the expression problem (2004), http://pauillac.inria.fr/~remy/work/expr/
  6. 6.
    Ohori, A.: A polymorphic record calculus and its compilation. ACM Transactions on Programming Languages and Systems 17, 844–895 (1995)CrossRefGoogle Scholar
  7. 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. 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. 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. 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. 11.
    Zenger, M., Odersky, M.: Independently extensible solutions to the expression problem. In: Workshop on Foundations of Object-Oriented Languages (2005)Google Scholar
  12. 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. 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. 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. 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. 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. 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. 18.
    Leroy, X.: A modular module system. Journal of Functional Programming 10, 269–303 (2000)MATHCrossRefGoogle Scholar
  19. 19.
    Garrigue, J.: Simple type inference for structural polymorphism. In: Workshop on Foundations of Object-Oriented Languages, Portland, Oregon (2002)Google Scholar
  20. 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. 21.
    Ramsey, N., Fisher, K., Govereau, P.: An expressive language of signatures. In: Proc. ACM International Conference on Functional Programming (2005)Google Scholar
  22. 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. 23.
    Russo, C.V.: Recursive structures for Standard ML. In: Proc. ACM International Conference on Functional Programming, pp. 50–61 (2001)Google Scholar
  24. 24.
    Nakata, K., Garrigue, J.: Recursive modules for programming. In: Proc. ACM International Conference on Functional Programming, Portland, Oregon (2006)Google Scholar

Copyright information

© Springer-Verlag Berlin Heidelberg 2006

Authors and Affiliations

  • Jacques Garrigue
    • 1
  1. 1.Graduate School of Mathematical SciencesNagoya UniversityNagoya

Personalised recommendations