Generic unification via two-level types and parameterized modules

  • Authors:
  • Tim Sheard

  • Affiliations:
  • Oregon Graduate Institute

  • Venue:
  • Proceedings of the sixth ACM SIGPLAN international conference on Functional programming
  • Year:
  • 2001

Quantified Score

Hi-index 0.00

Visualization

Abstract

As a functional pearl, we describe an efficient, modularizedimplementation of unification using the state of mutable referencecells to encode substitutions. We abstract our algorithms along twodimensions, first abstracting away from the structure of the termsto be unified, and second over the monad in which the mutable stateis encapsulated. We choose this example to illustrate two importanttechniques that we believe many functional programmers would finduseful. The first of these is the definition of recursive datatypes using two levels: a structure defining level, and a recursiveknot-tying level. The second is the use of rank-2 polymorphisminside Haskell's record types to implement a form of typeparameterized modules.