Error on ghc warnings and fix warnings