[Git][ghc/ghc][wip/T24083] Wibbles
Simon Peyton Jones (@simonpj)
gitlab at gitlab.haskell.org
Wed Nov 8 20:57:34 UTC 2023
Simon Peyton Jones pushed to branch wip/T24083 at Glasgow Haskell Compiler / GHC
Commits:
af9ff593 by Simon Peyton Jones at 2023-11-08T20:57:22+00:00
Wibbles
- - - - -
2 changed files:
- compiler/GHC/Tc/Gen/HsType.hs
- testsuite/tests/polykinds/T24083.stderr
Changes:
=====================================
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 ]
=====================================
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’
View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/commit/af9ff5937b971780a29c8516b89c503e675e563f
--
View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/commit/af9ff5937b971780a29c8516b89c503e675e563f
You're receiving this email because of your account on gitlab.haskell.org.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.haskell.org/pipermail/ghc-commits/attachments/20231108/f46e4e97/attachment-0001.html>
More information about the ghc-commits
mailing list