[GHC] #15592: Type families without CUSKs cannot be given visible kind variable binders

GHC ghc-devs at haskell.org
Tue Oct 2 18:37:59 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:                    |             Blocking:
 Related Tickets:  #15591            |  Differential Rev(s):
       Wiki Page:                    |
-------------------------------------+-------------------------------------

Comment (by RyanGlScott):

 Ah, I now understand why non-CUSKed declarations seem to have totally
 different behavior with respect to visibility than CUSKed ones: their
 visibilities are determined in a completely different part of the code! In
 particular, in `kcTyClGroup` (as opposed to `kcLHsQTyVars`, which was the
 case for #15591).
 [http://git.haskell.org/ghc.git/blob/21efbc7599e39ec93b8b13b7d7b84811226e6f6f:/compiler/typecheck/TcTyClsDecls.hs#l554
 This line] is quite relevant:

 {{{#!hs
  ; kvs <- kindGeneralize (mkTyConKind tc_binders tc_res_kind)
 }}}

 It appears that all kind variables are simply made invisible, which is
 clearly not what we want. Now we just need to figure out how to bend this
 code to our will...

-- 
Ticket URL: <http://ghc.haskell.org/trac/ghc/ticket/15592#comment:5>
GHC <http://www.haskell.org/ghc/>
The Glasgow Haskell Compiler


More information about the ghc-tickets mailing list