Ticket #940 (closed bug: fixed)

Opened 7 years ago

Last modified 5 years ago

GADT + impredicative polymorphism => stack overflow

Reported by: guest Owned by: simonpj
Priority: normal Milestone:
Component: Compiler (Type checker) Version: 6.6
Keywords: Cc:
Operating System: Unknown/Multiple Architecture: Unknown/Multiple
Type of failure: Difficulty: Unknown
Test Case: Blocked By:
Blocking: Related Tickets:

Description

The following makes the GHC 6.6 type checker loop/overflow:

{-# OPTIONS_GHC -fglasgow-exts #-}
data Foo a b where F :: a -> Foo () a

bar :: Foo () (forall a.a) -> ()
bar (F _) = ()

ghc yields stack overflow, as does ghci. Reloading in GHCi leads to an infinite loop.

Change History

Changed 7 years ago by simonpj

  • owner set to simonpj

Changed 7 years ago by simonpj

  • status changed from new to closed
  • resolution set to fixed

Great bug. I'd written a loop in the type-refinement code, which only shows up when forall types are involved. Now fixed.

Alas no decent workaround for 6.6. The fix will be in 6.6.1 though. And the HEAD is fine.

Simon

Changed 5 years ago by simonmar

  • architecture changed from Unknown to Unknown/Multiple

Changed 5 years ago by simonmar

  • os changed from Unknown to Unknown/Multiple
Note: See TracTickets for help on using tickets.