From 9f95db54e38b21782d058043abe42fd77abfb9ad Mon Sep 17 00:00:00 2001 From: Simon Peyton Jones Date: Fri, 27 Jan 2023 23:25:04 +0000 Subject: Improve treatment of type applications in patterns This patch fixes a subtle bug in the typechecking of type applications in patterns, e.g. f (MkT @Int @a x y) = ... See Note [Type applications in patterns] in GHC.Tc.Gen.Pat. This fixes #19847, #22383, #19577, #21501 --- compiler/GHC/Core/DataCon.hs | 1 + 1 file changed, 1 insertion(+) (limited to 'compiler/GHC/Core') diff --git a/compiler/GHC/Core/DataCon.hs b/compiler/GHC/Core/DataCon.hs index 3835bd0e6f..eb74536551 100644 --- a/compiler/GHC/Core/DataCon.hs +++ b/compiler/GHC/Core/DataCon.hs @@ -441,6 +441,7 @@ data DataCon -- INVARIANT(dataConTyVars): the set of tyvars in dcUserTyVarBinders is -- exactly the set of tyvars (*not* covars) of dcExTyCoVars unioned -- with the set of dcUnivTyVars whose tyvars do not appear in dcEqSpec + -- So dcUserTyVarBinders is a subset of (dcUnivTyVars ++ dcExTyCoVars) -- See Note [DataCon user type variable binders] dcUserTyVarBinders :: [InvisTVBinder], -- cgit v1.2.1