[GHC] #4309: Painfully large errors with silly GADT instances

GHC cvs-ghc at haskell.org
Wed Sep 15 10:52:17 EDT 2010


#4309: Painfully large errors with silly GADT instances
----------------------------------------------+-----------------------------
  Reporter:  pumpkin                          |          Owner:                  
      Type:  bug                              |         Status:  closed          
  Priority:  normal                           |      Milestone:                  
 Component:  Compiler                         |        Version:  6.12.3          
Resolution:  fixed                            |       Keywords:                  
  Testcase:  deriving/should_fail/drvfail011  |      Blockedby:                  
Difficulty:                                   |             Os:  Unknown/Multiple
  Blocking:                                   |   Architecture:  Unknown/Multiple
   Failure:  None/Unknown                     |  
----------------------------------------------+-----------------------------
Changes (by simonpj):

  * status:  new => closed
  * testcase:  => deriving/should_fail/drvfail011
  * resolution:  => fixed


Comment:

 OK, done
 {{{
 Wed Sep 15 00:23:01 PDT 2010  simonpj at microsoft.com
   * Less voluminous error when derived code doesn't typecheck

     M ./compiler/typecheck/TcInstDcls.lhs -8 +12
 }}}
 The error message now looks like:
 {{{
 drvfail011.hs:8:1:
     No instance for (Eq a)
       arising from a use of `=='
     In the expression: ((a1 == b1))
     In an equation for `==': == (T1 a1) (T1 b1) = ((a1 == b1))
     When typechecking the code for  `=='
       in a standalone derived instance for `Eq (T a)':
       To see the code I am typechecking, use -ddump-deriv
     In the instance declaration for `Eq (T a)'
 }}}

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


More information about the Glasgow-haskell-bugs mailing list