Hostname: page-component-77c78cf97d-bzm8f Total loading time: 0 Render date: 2026-04-24T15:03:22.767Z Has data issue: false hasContentIssue false

Warnings for pattern matching

Published online by Cambridge University Press:  15 February 2007

LUC MARANGET*
Affiliation:
Inria Rocquencourt, BP 105, 78153 Le Chesnay Cedex, France (e-mail: Luc.Maranget@inria.fr)
Rights & Permissions [Opens in a new window]

Abstract

Core share and HTML view are not available for this content. However, as you have access to this content, a full PDF is available via the 'Save PDF' action button.

We examine the ML pattern-matching anomalies of useless clauses and non-exhaustive matches. We state the definition of these anomalies, building upon pattern matching semantics, and propose a simple algorithm to detect them. We have integrated the algorithm in the Objective Caml compiler, but we show that the same algorithm is also usable in a non-strict language such as Haskell. Or-patterns are considered for both strict and non-strict languages.

Information

Type
Article
Copyright
Copyright © Cambridge University Press 2007
Submit a response

Discussions

No Discussions have been published for this article.