#5300: Infinite context reduction stack overflow
---------------------------------+------------------------------------------
    Reporter:  dsf               |       Owner:                    
        Type:  bug               |      Status:  new               
    Priority:  normal            |   Component:  Compiler          
     Version:  7.0.3             |    Keywords:                    
    Testcase:                    |   Blockedby:                    
          Os:  Unknown/Multiple  |    Blocking:                    
Architecture:  Unknown/Multiple  |     Failure:  Compile-time crash
---------------------------------+------------------------------------------
 The contrived example below gets a Context reduction stack overflow error
 no matter how big you make the context reduction stack.  I'm not sure
 whether this constitutes a fixable bug or not.

 {{{
 {-# LANGUAGE FunctionalDependencies, MultiParamTypeClasses #-}

 import Control.Monad.State (StateT)

 class C1 a b c | a -> b
 class C2 a b c

 data T b = T

 f1 :: (Monad m, C1 a b c) => a -> StateT (T b) m a
 f1 f = undefined

 f2 :: (Monad m, C1 a1 b1 c1, C2 a2 b2 c2) => a1 -> StateT (T b2) m a2
 f2 fm = f1 fm >>= return . undefined
 }}}

-- 
Ticket URL: <http://hackage.haskell.org/trac/ghc/ticket/5300>
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