summaryrefslogtreecommitdiff
path: root/compiler/GHC/Core
diff options
context:
space:
mode:
authorSimon Peyton Jones <simon.peytonjones@gmail.com>2023-01-27 23:25:04 +0000
committerSimon Peyton Jones <simon.peytonjones@gmail.com>2023-02-01 08:55:08 +0000
commit9f95db54e38b21782d058043abe42fd77abfb9ad (patch)
tree1b8c99859275a988a25a47d2be828969179f1552 /compiler/GHC/Core
parentf0eefa3cf058879246991747dcd18c811402f9e5 (diff)
downloadhaskell-9f95db54e38b21782d058043abe42fd77abfb9ad.tar.gz
Improve treatment of type applications in patternswip/T19847
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
Diffstat (limited to 'compiler/GHC/Core')
-rw-r--r--compiler/GHC/Core/DataCon.hs1
1 files changed, 1 insertions, 0 deletions
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],