From af9ff5937b971780a29c8516b89c503e675e563f Mon Sep 17 00:00:00 2001 From: Simon Peyton Jones <simon.peytonjones@gmail.com> Date: Wed, 8 Nov 2023 20:57:22 +0000 Subject: [PATCH] Wibbles --- compiler/GHC/Tc/Gen/HsType.hs | 12 ++++++------ testsuite/tests/polykinds/T24083.stderr | 6 ++++++ 2 files changed, 12 insertions(+), 6 deletions(-) diff --git a/compiler/GHC/Tc/Gen/HsType.hs b/compiler/GHC/Tc/Gen/HsType.hs index a235c534847f..83c0a5353e0e 100644 --- a/compiler/GHC/Tc/Gen/HsType.hs +++ b/compiler/GHC/Tc/Gen/HsType.hs @@ -2608,7 +2608,7 @@ kcCheckDeclHeader_sig sig_kind name flav ; implicit_tvs <- liftZonkM $ zonkTcTyVarsToTcTyVars implicit_tvs ; let implicit_prs = implicit_nms `zip` implicit_tvs ; checkForDuplicateScopedTyVars implicit_prs - ; checkForDisconnectedScopedTyVars sig_tcbs implicit_prs + ; checkForDisconnectedScopedTyVars skol_tcbs implicit_prs -- Swizzle the Names so that the TyCon uses the user-declared implicit names -- E.g type T :: k -> Type @@ -2622,11 +2622,11 @@ kcCheckDeclHeader_sig sig_kind name flav all_tv_prs = mkTyVarNamePairs (binderVars swizzled_tcbs) ; traceTc "kcCheckDeclHeader swizzle" $ vcat - [ text "implicit_prs = " <+> ppr implicit_prs - , text "implicit_nms = " <+> ppr implicit_nms - , text "hs_tv_bndrs = " <+> ppr hs_tv_bndrs - , text "all_tcbs = " <+> pprTyVars (binderVars all_tcbs) - , text "swizzled_tcbs = " <+> pprTyVars (binderVars swizzled_tcbs) + [ text "sig_tcbs =" <+> ppr sig_tcbs + , text "implicit_prs =" <+> ppr implicit_prs + , text "hs_tv_bndrs =" <+> ppr hs_tv_bndrs + , text "all_tcbs =" <+> pprTyVars (binderVars all_tcbs) + , text "swizzled_tcbs =" <+> pprTyVars (binderVars swizzled_tcbs) , text "tycon_res_kind =" <+> ppr tycon_res_kind , text "swizzled_kind =" <+> ppr swizzled_kind ] diff --git a/testsuite/tests/polykinds/T24083.stderr b/testsuite/tests/polykinds/T24083.stderr index e69de29bb2d1..a5a68dd164e1 100644 --- a/testsuite/tests/polykinds/T24083.stderr +++ b/testsuite/tests/polykinds/T24083.stderr @@ -0,0 +1,6 @@ + +T24083.hs:13:14: error: [GHC-59738] + • Scoped type variable only appears non-injectively in declaration header: + ‘t’ bound at T24083.hs:13:14 + • In the class declaration for ‘IsSum’ + Suggested fix: bind ‘t’ explicitly with ‘@t’ -- GitLab