Fix build, and improve ghc-cabal's errors