[GHC] #15592: Type families without CUSKs cannot be given visible kind variable binders
GHC
ghc-devs at haskell.org
Wed Oct 3 17:18:06 UTC 2018
#15592: Type families without CUSKs cannot be given visible kind variable binders
-------------------------------------+-------------------------------------
Reporter: RyanGlScott | Owner: (none)
Type: bug | Status: new
Priority: normal | Milestone: 8.8.1
Component: Compiler | Version: 8.4.3
Resolution: | Keywords:
| TypeApplications, TypeFamilies,
| CUSKs
Operating System: Unknown/Multiple | Architecture:
| Unknown/Multiple
Type of failure: None/Unknown | Test Case:
Blocked By: 14880 | Blocking:
Related Tickets: #15591 | Differential Rev(s):
Wiki Page: |
-------------------------------------+-------------------------------------
Comment (by RyanGlScott):
Replying to [comment:10 simonpj]:
> Hmm. I wonder if we should simply add `a` to the `tyConScopedTyVars` of
`T`? And that info ''is'' available in `kcLHsTQTVars` which builds the
`TcTyCon`.
I too am a bit confused as to why we don't add `a` (or any kind variables,
for that matter) to `tcTyConScopedTyVars` in the non-CUSK case of
`kcLHsQTyVars`. The only reasoning I could find for this design choice is
[http://git.haskell.org/ghc.git/blob/fc2ff6dd7496a33bf68165b28f37f40b7d647418:/compiler/typecheck/TcHsType.hs#l1609
this terse comment]:
{{{#!hs
; let -- NB: Don't add scoped_kvs to tyConTyVars, because they
-- must remain lined up with the binders
tc_binders = zipWith mk_tc_binder hs_tvs tc_tvs
tycon = mkTcTyCon name (ppr user_tyvars) tc_binders res_kind
(mkTyVarNamePairs (scoped_kvs ++ tc_tvs))
flav
}}}
(Here, they call `tcTyConScopedTyVars` "`tyConTyVars`".)
--
Ticket URL: <http://ghc.haskell.org/trac/ghc/ticket/15592#comment:11>
GHC <http://www.haskell.org/ghc/>
The Glasgow Haskell Compiler
More information about the ghc-tickets
mailing list