fix warnings in ghc-7.8