Statically Checkable Pattern Abstractions

by Manuel Fähndrich and John Boyland.


Pattern abstractions increase the expressiveness of pattern matching, enabling the programmer to describe a broader class of regular forests with patterns. Furthermore, pattern abstractions support code reuse and code factoring, features that facilitate maintenance and evolution of code. Past research on pattern abstractions has generally ignored the aspect of compile-time checks for exhaustiveness and redundancy. In this paper we propose a class of expressive patterns that admits these compile-time checks.

BibTeX Style Reference

  author =      {Manuel F\"{a}hndrich and John Boyland},
  title =       {Statically Checkable Pattern Abstractions},
  booktitle =   {Proceedings of the 1997 ACM SIGPLAN 
	         International Conference on Functional Programming},
  month =       jun,
  year =        1997,
  pages =	{75--84},
  nothing =     {})

How to get a copy

The paper has appeared in the proceedings of ICFP '97 (Amsterdam), published by ACM Press. The full text is available on the ACM server. You may also send email to for a reprint.


The data type definition given for the first example has no interesting values. It should be replaced by the following data type:

    datatype forest = Node of { label : int; children : forest list }
                    | Union of forest list


Effort sponsored by the Defense Advanced Research Projects Agency, and Rome Laboratory, Air Force Materiel Command, USAF, under agreement number F30602-97-2-0241.


The views and conclusions contained herein are those of the authors and should not be interpreted as necessarily representing the official policies or endorsements, either expressed or implied, of the Defense Advanced Research Projects Agency, Rome Laboratory or the U.S. Government.

Last Modified: February 2, 1999

Statically Checkable Pattern Abstractions /