Skip to content
naulon

No noticeNo retraction, correction or concern found when last checked on Dec 2, 2026.

GADTs and Exhaustiveness: Looking for the Impossible

Jacques Garrigue, Jacques Le Normand

Electronic Proceedings in Theoretical Computer Science · 2017

doi:10.4204/eptcs.241.2 (opens in a new tab)

We email you when a new notice or a question about this paper appears.

Abstract

Sound exhaustiveness checking of pattern-matching is an essential feature of functional programming languages, and OCaml supports it for GADTs. However this check is incomplete, in that it may fail to detect that a pattern can match no concrete value. In this paper we show that this problem is actually undecidable, but that we can strengthen the exhaustiveness and redundancy checks so that they cover more practical cases. The new algorithm relies on a clever modification of type inference for patterns.

Abstract licence: CC BY-NC-ND

Reads

Read by people on this page

None yet.

Checked or read by AI through naulon

None yet.

A person counts once a day per paper. We keep no cookie and no address: a reader is a hash that changes every day. Any month under five reads shows no number.

Are you an author?

Is this your paper?

Claim it to add your note and be paid when agents cite it. Free.