X-Git-Url: http://git.megacz.com/?a=blobdiff_plain;ds=sidebyside;f=compiler%2Ftypecheck%2FTcTyClsDecls.lhs;h=f3abbe94f826d796f64741990a9c13d07a21c290;hb=f59d6c9d6ead47a61681b1086b313c2fad225912;hp=c1e58161d14f51dfda749061805e0517d98e9df7;hpb=cbcc6ec44ae3d8c17a54c0d4e5e6dac622019428;p=ghc-hetmet.git diff --git a/compiler/typecheck/TcTyClsDecls.lhs b/compiler/typecheck/TcTyClsDecls.lhs index c1e5816..f3abbe9 100644 --- a/compiler/typecheck/TcTyClsDecls.lhs +++ b/compiler/typecheck/TcTyClsDecls.lhs @@ -812,7 +812,8 @@ tcConDecl :: Bool -- True <=> -funbox-strict_fields tcConDecl unbox_strict existential_ok tycon tc_tvs -- Data types (ConDecl name _ tvs ctxt details res_ty _) - = tcTyVarBndrs tvs $ \ tvs' -> do + = addErrCtxt (dataConCtxt name) $ + tcTyVarBndrs tvs $ \ tvs' -> do { ctxt' <- tcHsKindedContext ctxt ; checkTc (existential_ok || (null tvs && null (unLoc ctxt))) (badExistential name)