#3965: 'deriving Data' compilation regression 6.10.1 -> 6.12.1
-------------------------+--------------------------------------------------
    Reporter:  ronwalf   |        Owner:                               
        Type:  bug       |       Status:  merge                        
    Priority:  high      |    Milestone:  6.12.3                       
   Component:  Compiler  |      Version:  6.12.1                       
    Keywords:            |   Difficulty:                               
          Os:  MacOS X   |     Testcase:  deriving/should_compile/T3965
Architecture:  x86       |      Failure:  GHC rejects valid program    
-------------------------+--------------------------------------------------
Changes (by simonpj):

  * status:  new => merge
  * testcase:  => deriving/should_compile/T3965


Comment:

 Great report, thanks.  Fixed by
 {{{
 Fri Apr  9 19:44:20 BST 2010  [email protected]
   * Fix Trac #3965: tighten conditions when deriving Data

   It's tricky to set up the context for a Data instance.  I got it wrong
   once, and fixed it -- hence the "extra_constraints" in
   TcDeriv.inferConstraints.

   But it still wasn't right!  The tricky bit is that dataCast1 is only
   generated when T :: *->*, and dataCast2 when T :: *->*->*. (See
   the code in TcGenDeriv for dataCastX.

     M ./compiler/typecheck/TcDeriv.lhs -8 +14
 }}}
 Perhaps merge to 6.12.3

 Simon

-- 
Ticket URL: <http://hackage.haskell.org/trac/ghc/ticket/3965#comment:4>
GHC <http://www.haskell.org/ghc/>
The Glasgow Haskell Compiler
_______________________________________________
Glasgow-haskell-bugs mailing list
[email protected]
http://www.haskell.org/mailman/listinfo/glasgow-haskell-bugs

Reply via email to