bjpop / language-python

A parser for Python 2.x and 3.x written in Haskell
157 stars 45 forks source link

Fix warnings about incomplete patterns and unused imports. #47

Closed dperelman closed 5 years ago

dperelman commented 5 years ago

See #46.

This fixes warnings of -Wincomplete-patterns and -Wunused-imports in a few places. There are still warnings about using the deprecated type Control.Monad.Error which are not fixed in this PR.

-Wincomplete-patterns is mostly fixed by adding patterns like _ = error "reason why pattern is unreachable". -Wunused-imports is mostly fixed by just deleting the imports that it complained about. This included editing Version3/Parser/Lexer.x which is marked as being an auto-generated file, but it's checked in and I don't see what it was autogenerated from.

I have run bjpop/language-python-test to confirm I didn't break anything.