#3012: A little deriving for GADTs
---------------------------------+------------------------------------------
    Reporter:  guest             |        Owner:                  
        Type:  feature request   |       Status:  closed          
    Priority:  normal            |    Milestone:  6.12.1          
   Component:  Compiler          |      Version:  6.10.1          
    Severity:  minor             |   Resolution:  fixed           
    Keywords:                    |   Difficulty:  Unknown         
    Testcase:                    |           Os:  Unknown/Multiple
Architecture:  Unknown/Multiple  |  
---------------------------------+------------------------------------------
Changes (by simonpj):

  * status:  new => closed
  * resolution:  => fixed

Comment:

 OK it's done
 {{{
 Thu Jul 23 06:01:45 PDT 2009  [email protected]
   * Fix Trac #3012: allow more free-wheeling in standalone deriving
   Ignore-this: 357580b9388ccbe1da3c1da3ba90e456

   In standalone deriving, we now do *not* check side conditions.
   We simply generate the code and typecheck it.  If there's a type
   error, it's the programmer's problem.

   This means that you can do 'deriving instance Show (T a)', where
   T is a GADT, for example, provided of course that the boilerplate
   code does in fact typecheck.

   I put some work into getting a decent error message.  In particular
   if there's a type error in a method, GHC will show the entire code
   for that method (since, after all, the user did not write it).
   Most of the changes are to achieve that goal.

   Still to come: changes in the documentation.


     M ./compiler/typecheck/TcClassDcl.lhs -1 +1
     M ./compiler/typecheck/TcDeriv.lhs -25 +27
     M ./compiler/typecheck/TcEnv.lhs -2 +3
     M ./compiler/typecheck/TcInstDcls.lhs -8 +22
     M ./compiler/typecheck/TcMatches.lhs -1 +2
     M ./compiler/typecheck/TcRnMonad.lhs -21 +31
     M ./compiler/typecheck/TcRnTypes.lhs -6 +9
     M ./compiler/utils/Outputable.lhs -3 +3
 }}}
 Simon

-- 
Ticket URL: <http://hackage.haskell.org/trac/ghc/ticket/3012#comment:6>
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