Commit bf05aec
committed
Hide erros about non-exhaustive pattern matches
There is a problem in sendCommand message that we process some
commands first and compiler can't infer that they are not reachable
in the next clauses. It's possible to ignore the message, but it will
require developer to observe the code each time in order to check
if we have not introduced a new error. Another possibility is to
introduce a datatype for all the commands and try make GHC infter
the unreachability of the clause — probably it's the best scenario
but it's a major change to the library, that can affect downstream
packages. So now we added a error message that works as a comment to
the code and will provide a reasonable error to the user if ever
triggered1 parent f19c889 commit bf05aec
2 files changed
+5
-0
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
159 | 159 | | |
160 | 160 | | |
161 | 161 | | |
| 162 | + | |
| 163 | + | |
| 164 | + | |
162 | 165 | | |
163 | 166 | | |
164 | 167 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
302 | 302 | | |
303 | 303 | | |
304 | 304 | | |
| 305 | + | |
| 306 | + | |
305 | 307 | | |
306 | 308 | | |
307 | 309 | | |
| |||
0 commit comments