Exhaustive Pattern-Matching

Simon Marlow simonmar@microsoft.com
Wed, 27 Aug 2003 16:57:27 +0100


=20
> I have a question about pattern-matching. In the Haskell-report it is=20
> not postulated, that
> pattern matching has to be exhaustive. Would it be possible at all to=20
> implement an
> algorithm, which checks Haskell-style patterns for=20
> exhaustiveness? What=20
> kinds of
> complication can be expected? Maybe you have some pointers to other=20
> resources about
> this topic.

GHC tries to do so, but sometimes gets it wrong.  See the
-fwarn-incomplete-patterns flag.  We'd appreciate it if someone could
overhaul this code - it's been on the wish list for a long time.

Cheers,
	Simon