#7347: Existential data constructors should not be promoted
    Reporter:  simonpj           |       Owner:                  
        Type:  bug               |      Status:  merge           
    Priority:  normal            |   Milestone:                  
   Component:  Compiler          |     Version:  7.6.1           
    Keywords:                    |          Os:  Unknown/Multiple
Architecture:  Unknown/Multiple  |     Failure:  None/Unknown    
  Difficulty:  Unknown           |    Testcase:  polykinds/T7347 
   Blockedby:                    |    Blocking:                  
     Related:                    |  

Comment(by goldfire):

 If you declare {{{KEx}}} as above, something weird happens when you
 promote (in 7.6.1): the type {{{KEx}}} gets promoted to a kind, but the
 kind-polymorphic data constructor {{{MkKEx}}} does not get promoted to a
 type. So, {{{KEx}}} becomes an uninhabited kind. This behavior is weird,
 but it seems not to violate any description of promotion: kind-polymorphic
 things are not promoted, and other (suitable) things are.

 So, one cannot write an {{{UnKEx}}} type instance, and thus there is no

 I agree that this is far from urgent. But, if the checks you added to fix
 this bug added complexity, they could perhaps be removed. I believe the
 original implementation of naive promotion of existentials is the right

Ticket URL: <http://hackage.haskell.org/trac/ghc/ticket/7347#comment:13>
GHC <http://www.haskell.org/ghc/>
The Glasgow Haskell Compiler

Glasgow-haskell-bugs mailing list

Reply via email to