-notFound name
- = failWithTc (ptext SLIT("GHC internal error:") <+> quotes (ppr name) <+>
- ptext SLIT("is not in scope"))
+notFound name env
+ = failWithTc (vcat[ptext SLIT("GHC internal error:") <+> quotes (ppr name) <+>
+ ptext SLIT("is not in scope during type checking, but it passed the renamer"),
+ ptext SLIT("tcg_type_env of environment:") <+> ppr (tcg_type_env env)]
+ )