Compiling with Non-Parametric Polymorphism (Preliminary Report)

  • Authors:
  • Robert Harper;Greg Morrisett

  • Affiliations:
  • -;-

  • Venue:
  • Compiling with Non-Parametric Polymorphism (Preliminary Report)
  • Year:
  • 1994

Quantified Score

Hi-index 0.00

Visualization

Abstract

There is a middle ground between parametric and ad-hoc polymorphism in which a computation can depend upon a type parameter but is restricted to being defined at all types in an inductive fashion. We call such polymorphism non-parametric. We show how non-parametric polymorphism can be used to implement a variety of useful language mechanisms including overloading, unboxed data representations in the presence of ML-style polymorphism, and canonical representations of equivalent types. Moreover, we show that, by using a second-order, explicitly typed language extended with non-parametric operations, these mechanisms can be implemented without having to tag data with type information at runtime. Finally, we demonstrate that this approach retains a "phase distinction" permitting type checking and separate compilation. Our aim is to provide a unifying language, translation, and proof framework in which a variety of non-parametric mechanisms can be expressed and verified.