[GHC] #6117: Cyclic Type Class Hierarchy Produces <<loop>>

GHC cvs-ghc at haskell.org
Thu Nov 22 20:14:58 CET 2012


#6117: Cyclic Type Class Hierarchy Produces <<loop>>
----------------------------------------+-----------------------------------
    Reporter:  jun0                     |       Owner:  simonpj                    
        Type:  bug                      |      Status:  new                        
    Priority:  normal                   |   Milestone:  7.8.1                      
   Component:  Compiler (Type checker)  |     Version:  7.4.1                      
    Keywords:                           |          Os:  Linux                      
Architecture:  Unknown/Multiple         |     Failure:  Incorrect result at runtime
  Difficulty:  Unknown                  |    Testcase:  T6117                      
   Blockedby:                           |    Blocking:                             
     Related:                           |  
----------------------------------------+-----------------------------------

Comment(by monoidal):

 In fact, the core lint error is on much simpler:

 {{{
 class B a where
     b :: a

 newtype Additive a = Additive a

 instance B a => B (Additive a) where
    b = Additive b

 main = undefined
 }}}

 This is a bit worrisome, since this is a rather natural program.

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



More information about the Glasgow-haskell-bugs mailing list