cascading type errors in ghc