[GHC] #2851: Improve error message for failed deriving

GHC trac at galois.com
Mon Dec 8 20:04:18 EST 2008


#2851: Improve error message for failed deriving
----------------------------------------+-----------------------------------
    Reporter:  guest                    |        Owner:                  
        Type:  feature request          |       Status:  reopened        
    Priority:  normal                   |    Milestone:                  
   Component:  Compiler (Type checker)  |      Version:  6.10.1          
    Severity:  minor                    |   Resolution:                  
    Keywords:                           |   Difficulty:  Unknown         
    Testcase:                           |           Os:  Unknown/Multiple
Architecture:  Unknown/Multiple         |  
----------------------------------------+-----------------------------------
Changes (by guest):

  * status:  closed => reopened
  * component:  Compiler => Compiler (Type checker)
  * resolution:  invalid =>
  * summary:  Deriving doesn't work when type families are involved =>
              Improve error message for failed deriving

Comment:

 (I don't have a ghc-6.10 here to test, so maybe it's already good, but)
 It would be nice if, when deriving fails but standalone deriving might
 work, the error message would suggest to you to try standalone deriving.
 (and warn you what other extensions you might need. ...And ideally it
 would even suggest the whole deriving-line e.g.
 {{{
 deriving instance Show (F a) => Show (D a)
 }}}
 , but of course one of the issues is that GHC can't always even make a
 good guess at what you want the context to be.)

 -Isaac Dupree

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


More information about the Glasgow-haskell-bugs mailing list