[GHC] #7873: A poly-kinded newtype existential crisis

GHC cvs-ghc at haskell.org
Fri May 3 11:10:06 CEST 2013


#7873: A poly-kinded newtype existential crisis
----------------------------------------+-----------------------------------
  Reporter:  ekmett                     |          Owner:                  
      Type:  bug                        |         Status:  closed          
  Priority:  normal                     |      Milestone:                  
 Component:  Compiler                   |        Version:  7.6.3           
Resolution:  fixed                      |       Keywords:                  
        Os:  Unknown/Multiple           |   Architecture:  Unknown/Multiple
   Failure:  GHC rejects valid program  |     Difficulty:  Unknown         
  Testcase:  ghci/scripts/T7873         |      Blockedby:                  
  Blocking:                             |        Related:                  
----------------------------------------+-----------------------------------

Comment(by simonpj):

 Oh, I also improve the rather cryptic "existential" error message
 {{{
 T7863.hs:5:17:
     A newtype constructor cannot have existential type variables
     Magic :: forall (k :: BOX).
              (forall (p :: k -> *) (a :: k). p a -> Int) -> Magic
     In the definition of data constructor ‛Magic’
     In the newtype declaration for ‛Magic’
 }}}
 with this commit
 {{{
 commit bee30a6586ae157d8a5569f17f0e4cd14ab71653
 Author: Simon Peyton Jones <simonpj at microsoft.com>
 Date:   Fri May 3 10:06:19 2013 +0100

     Improve error message for existential newtypes

  compiler/typecheck/TcTyClsDecls.lhs |   24 ++++++++++++------------
  1 file changed, 12 insertions(+), 12 deletions(-)
 }}}

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



More information about the ghc-tickets mailing list