Non-exhaustive pattern match(es) warning in lambda functions

Mitar mmitar at
Thu Nov 18 06:20:31 EST 2010


On Wed, Nov 17, 2010 at 11:52 AM, Sittampalam, Ganesh
<ganesh.sittampalam at> wrote:
> If GHC added support "or" patterns, you could write them out quite
> concisely:
> bar Foo1 Foo2 Foo3 = ...
> bar (Foo1|Foo2|Foo3) (Foo1|Foo2|Foo3) (Foo1|Foo2|Foo3) = error "..."

Uh. Still no nice solution.

But this is a form of closed world assumption. When you write _ as a
case you in fact use this assumption. But when you later on extend the
"world" with some new case, this assumption could not really hold


More information about the Glasgow-haskell-users mailing list