X-Git-Url: http://git.megacz.com/?a=blobdiff_plain;f=compiler%2Ftypecheck%2FTcTyClsDecls.lhs;h=89afedfda8ea757cf3f95eadc40de2bea19bac76;hb=7ea43827e739555c23f2b802a6a5eaf2a65570ae;hp=83b2114d2d5822a3b185da28e63db768e40e8c07;hpb=7c7aa22db9e35b4b416dcdf52d5e9b32c61c9b52;p=ghc-hetmet.git diff --git a/compiler/typecheck/TcTyClsDecls.lhs b/compiler/typecheck/TcTyClsDecls.lhs index 83b2114..89afedf 100644 --- a/compiler/typecheck/TcTyClsDecls.lhs +++ b/compiler/typecheck/TcTyClsDecls.lhs @@ -1054,6 +1054,9 @@ checkValidDataCon tc con addErrCtxt (dataConCtxt con) $ do { checkTc (dataConTyCon con == tc) (badDataConTyCon con) ; checkValidType ctxt (dataConUserType con) + ; checkValidMonoType (dataConOrigResTy con) + -- Disallow MkT :: T (forall a. a->a) + -- Reason: it's really the argument of an equality constraint ; ifM (isNewTyCon tc) (checkNewDataCon con) } where