Add -Wall to build flags and remove all the warnings.

Curiously, the import list for Main.hs was about 1/3 of the source code of
Main.hs.