[GHC] #6001: Wrong diagnostics for instance signature mismatch

GHC cvs-ghc at haskell.org
Thu Apr 12 12:20:09 CEST 2012


#6001: Wrong diagnostics for instance signature mismatch
---------------------------------+------------------------------------------
    Reporter:  heisenbug         |       Owner:  pcapriotti                       
        Type:  bug               |      Status:  new                              
    Priority:  normal            |   Milestone:  7.6.1                            
   Component:  Compiler          |     Version:  7.5                              
    Keywords:                    |          Os:  Unknown/Multiple                 
Architecture:  Unknown/Multiple  |     Failure:  Incorrect warning at compile-time
  Difficulty:  Unknown           |    Testcase:                                   
   Blockedby:                    |    Blocking:                                   
     Related:                    |  
---------------------------------+------------------------------------------

Comment(by heisenbug):

 Yeah, fix is here (for the mixup in the diagnostics)

 http://www.haskell.org/pipermail/cvs-ghc/2012-April/072117.html

 But when I change the signature to read

 {{{
 instance Num (Day c) where
   fromInteger :: Integer -> Day p
   fromInteger 1 = Mon
   fromInteger 6 = Sat
 }}}

 I still get

 NumGADT.hs:10:18:
     Method signature does not match class; it should be
       fromInteger :: Integer -> Day c
     In the instance declaration for `Num (Day c)'


 Is this another bug down the rabbit hole?

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



More information about the Glasgow-haskell-bugs mailing list