#7481: Partially promoted data types
    Reporter:  simonpj           |       Owner:                  
        Type:  bug               |      Status:  new             
    Priority:  high              |   Milestone:  7.8.1           
   Component:  Compiler          |     Version:  7.6.1           
    Keywords:                    |          Os:  Unknown/Multiple
Architecture:  Unknown/Multiple  |     Failure:  None/Unknown    
  Difficulty:  Unknown           |    Testcase:                  
   Blockedby:                    |    Blocking:                  
     Related:                    |  
 data D a where
   D1 :: a -> D a
   D2 :: (a~Int) => D a
   D3 :: forall (a:k). Proxy a -> D b

 Is `D` a promoted type?

 Well, `D1` is promotable, but `D2` is not because of constraints in its
 type, and neither is `D3` because it uses kind polymorphism.  It's a bit
 odd to promote only one of the three constructors, but that is what
 happens right now.

 We should probably check for promotability of all data constructors, and
 promote all or none.  A bit of fiddling around is need to do this, so I'm
 opening a ticket.  It's not terribly pressing.

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

Glasgow-haskell-bugs mailing list

Reply via email to