Split multi-branch unreachability warnings
Currently, if multiple branches in a case expression are unreachable, a single warning message is emitted:
module MultiBranch where
test x = case x of
1 -> 2
_ -> 3
_ -> 4
_ -> 5
_ -> 6
..\curry-playground\MultiBranch.curry, line 4.5: Warning:
Pattern matches are potentially unreachable
In a case alternative:
_
_
_ -> ...
It would be nice, however, to split this up into multiple warning messages to provide accurate line information for each branch:
..\curry-playground\MultiBranch.curry, line 6.5: Warning:
Pattern match is potentially unreachable
In a case alternative:
_ -> ...
..\curry-playground\MultiBranch.curry, line 7.5: Warning:
Pattern match is potentially unreachable
In a case alternative:
_ -> ...
..\curry-playground\MultiBranch.curry, line 8.5: Warning:
Pattern match is potentially unreachable
In a case alternative:
_ -> ...