Ticket #5837 (closed bug: fixed)
Context reduction stack overflow can take very long
| Reported by: | dreixel | Owned by: | simonpj |
|---|---|---|---|
| Priority: | normal | Milestone: | 7.6.1 |
| Component: | Compiler (Type checker) | Version: | 7.4.1-rc2 |
| Keywords: | Cc: | ||
| Operating System: | Unknown/Multiple | Architecture: | Unknown/Multiple |
| Type of failure: | None/Unknown | Difficulty: | Unknown |
| Test Case: | perf/compiler/T5837 | Blocked By: | |
| Blocking: | Related Tickets: |
Description
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.
Change History
Note: See
TracTickets for help on using
tickets.
