#5837: Context reduction stack overflow can take very long
------------------------------+---------------------------------------------
Reporter: dreixel | Owner:
Type: bug | Status: new
Priority: normal | Component: Compiler (Type checker)
Version: 7.4.1-rc2 | Keywords:
Os: Unknown/Multiple | Architecture: Unknown/Multiple
Failure: None/Unknown | Testcase:
Blockedby: | Blocking:
Related: |
------------------------------+---------------------------------------------
The following code, taken from the "Haskell Type Constraints Unleashed"
paper:
{{{
{-# LANGUAGE TypeFamilies #-}
type family TF a :: *
type instance TF (a,b) = (TF a, TF b)
t :: (a ~ TF (a,Int)) => Int
t = undefined
}}}
fails almost immediately with `Context reduction stack overflow` on GHC
7.2, but seems to loop forever with 7.4.1-rc2. Setting `-fcontext-stack`
to `20` results in near immediate termination with the same error. But
#5395 raised the context stack size default to `200`, which makes this
code (that does not use `-XUndecidableInstances`) take "forever" to
compile.
--
Ticket URL: <http://hackage.haskell.org/trac/ghc/ticket/5837>
GHC <http://www.haskell.org/ghc/>
The Glasgow Haskell Compiler
_______________________________________________
Glasgow-haskell-bugs mailing list
[email protected]
http://www.haskell.org/mailman/listinfo/glasgow-haskell-bugs