[GHC] #15142: GHC HEAD regression: tcTyVarDetails

GHC ghc-devs at haskell.org
Fri Jun 1 14:44:08 UTC 2018


#15142: GHC HEAD regression: tcTyVarDetails
-------------------------------------+-------------------------------------
        Reporter:  RyanGlScott       |                Owner:  goldfire
            Type:  bug               |               Status:  new
        Priority:  highest           |            Milestone:  8.6.1
       Component:  Compiler (Type    |              Version:  8.5
  checker)                           |             Keywords:  TypeInType,
      Resolution:                    |  TypeFamilies, CUSKs
Operating System:  Unknown/Multiple  |         Architecture:
 Type of failure:  Compile-time      |  Unknown/Multiple
  crash or panic                     |            Test Case:
      Blocked By:                    |             Blocking:
 Related Tickets:                    |  Differential Rev(s):
       Wiki Page:                    |
-------------------------------------+-------------------------------------

Comment (by simonpj):

 Simon says: when there is a CUSK, quantify over any free kind variables.
 Example at the term level
 {{{
 f :: forall (a :: Proxy k). Proxy a -> Int
 }}}
 Then we infer (notice the `k2`):
 {{{
 f :: forall k2 (k :: k2). forall (a :: Proxy k). Proxy a -> Int
 }}}
 So similarly at tke type level if we have this CUSK
 {{{
 data T (a :: Proxy k) :: Proxy a -> Type where ...
 }}}
 we should quantify over the kind to get
 {{{
 T :: forall k2 (k :: k2). forall (a :: Proxy k). Proxy a -> Type
 }}}
 This would require changing code in the CUSK case of `kcLHsQTyVars`, which
 currently calls `report_non_cusk_tvs` to complain.   Instead, generalise.

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


More information about the ghc-tickets mailing list