#7255: Wrong suggestion when deriving Generic on an instantiated type
------------------------------+---------------------------------------------
 Reporter:  dreixel           |          Owner:  dreixel         
     Type:  bug               |         Status:  new             
 Priority:  normal            |      Component:  Compiler        
  Version:  7.6.1             |       Keywords:                  
       Os:  Unknown/Multiple  |   Architecture:  Unknown/Multiple
  Failure:  None/Unknown      |       Testcase:                  
Blockedby:                    |       Blocking:                  
  Related:                    |  
------------------------------+---------------------------------------------
 The following code

 {{{
 {-# LANGUAGE DeriveGeneric      #-}
 {-# LANGUAGE StandaloneDeriving #-}
 {-# LANGUAGE FlexibleInstances  #-}

 import GHC.Generics

 data A a

 data B

 deriving instance Generic (A B)
 }}}

 gives rise to the error

 {{{
     Can't make a derived instance of `Generic (A B)':
       A must not be instantiated; try deriving `A B' instead
     In the stand-alone deriving instance for `Generic (A B)'
 }}}

 It should indeed fail, but the suggestion should be to try deriving `A a`
 instead.

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

_______________________________________________
Glasgow-haskell-bugs mailing list
Glasgow-haskell-bugs@haskell.org
http://www.haskell.org/mailman/listinfo/glasgow-haskell-bugs

Reply via email to