Haskell-Total-Library icon indicating copy to clipboard operation
Haskell-Total-Library copied to clipboard

Any way to extend this to also check for redundant matches?

Open mstksg opened this issue 10 years ago • 1 comments

Just a passing thought...such a concept would be useful for something I was doing and was wondering if it'd be possible :)

mstksg avatar Jul 17 '15 01:07 mstksg

It's not possible to forbid redundant pattern matches using this approach, but it is also hard to do them by accident. The redundant branch will bind a value of type Void, which will probably give rise to a type error if you were not expecting the Void.

Gabriella439 avatar Jul 17 '15 03:07 Gabriella439