Private row types: abstracting the unnamed

  • Authors:
  • Jacques Garrigue

  • Affiliations:
  • Graduate School of Mathematical Sciences, Nagoya University, Nagoya

  • Venue:
  • APLAS'06 Proceedings of the 4th Asian conference on Programming Languages and Systems
  • Year:
  • 2006

Quantified Score

Hi-index 0.00

Visualization

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.