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

GHC ghc-devs at haskell.org
Fri Nov 2 18:38:07 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:
                                     |  polykinds/T15592{,b}
      Blocked By:  14880             |             Blocking:
 Related Tickets:  #15591            |  Differential Rev(s):
       Wiki Page:                    |
-------------------------------------+-------------------------------------

Comment (by goldfire):

 Just to chime in agreement with comment:21. I'm sympathetic to the desire
 to put class variables first, but it gets ugly quickly. Here's another
 example:

 {{{#!hs
 class C a where
   type F (x :: (f :: k -> Type) a)
 }}}

 Here, `k` is actually a ''class'' variable, even though that's highly non-
 obvious. So `k` should go in the first clump of variables. But it would be
 easy to assume that `k`, not mentioned in the class header, goes with the
 second clump of variables.

 In the end, I agreed that there are just too many wrinkles in the "class
 variables come first" design, and went with "infer variable order /
 visibility locally" instead.

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


More information about the ghc-tickets mailing list