... | ... | @@ -34,7 +34,7 @@ However, previous versions of GHC did not recognize this fact and flagged `f` as |
|
|
```hs
|
|
|
f :: Foo -> Int
|
|
|
f (MkFoo1 i) = i
|
|
|
f (MkFoo2 _) = error "unreachable"
|
|
|
f (MkFoo2 v) = absurd v
|
|
|
```
|
|
|
|
|
|
|
... | ... | @@ -43,7 +43,7 @@ However, now that GHC is smart enough to recognize that `MkFoo2` is unreachable, |
|
|
|
|
|
```wiki
|
|
|
Pattern match is redundant
|
|
|
In an equation for ‘f’: f (MkFoo2 _) = ...
|
|
|
In an equation for ‘f’: f (MkFoo2 v) = ...
|
|
|
```
|
|
|
|
|
|
|
... | ... | |