Opened 5 years ago

Closed 5 years ago

Last modified 4 years ago

#7369 closed bug (duplicate)

Simplifier bug(?)

Reported by: sweirich Owned by:
Priority: normal Milestone:
Component: Compiler Version: 7.6.1
Keywords: Cc:
Operating System: Unknown/Multiple Architecture: Unknown/Multiple
Type of failure: Other Test Case:
Blocked By: Blocking:
Related Tickets: Differential Rev(s):
Wiki Page:

Description

Not sure if it is really a bug. I was playing around with the following infinite loop in GHC 7.6:

{-# LANGUAGE GADTs, KindSignatures #-}

data False

data I (c :: * -> *)

data R (c :: *) where
  R :: (a (I a) -> False) -> R (I a)

delta :: R (I R) -> False
delta = \ (R f) -> f (R f)

omega :: False
omega = delta (R delta)

main :: IO ()
main = seq omega (return ())

And I got the following result. It's supposed to be an infinite loop, though, so maybe it is ok. GHC 7.4 just hangs on this example.

spaceman:haskell sweirich$ ghc inj4.hs
[1 of 1] Compiling Main             ( inj4.hs, inj4.o )
ghc: panic! (the 'impossible' happened)
  (GHC version 7.6.1 for i386-apple-darwin):
	Simplifier ticks exhausted
    When trying UnfoldingDone main:Main.$WR{v reV} [gid[DataConWrapper]]
    To increase the limit, use -fsimpl-tick-factor=N (default 100)
    If you need to do this, let GHC HQ know, and what factor you needed
    To see detailed counts use -ddump-simpl-stats
    Total ticks: 5160

Please report this as a GHC bug:  http://www.haskell.org/ghc/reportabug

Change History (4)

comment:1 Changed 5 years ago by simonpj

difficulty: Unknown
Resolution: duplicate
Status: newclosed

I think this is a dup of GHC's russel-paradox bug: #1495. Re-open if you disagree.

comment:2 Changed 5 years ago by sweirich

Ah, not a dup of #1495 (which related but uses newtypes and is reported "fixed"), but it is a duplicate of #5400 (which uses GADTs).

Also related to #3872.

comment:3 in reply to:  2 Changed 5 years ago by sweirich

Replying to sweirich:

Ah, not a dup of #1495 (which related but uses newtypes and is reported "fixed"), but it is a duplicate of #5400 (which uses GADTs).

Also related to #3872.

Oops, I meant is a duplicate of #3872 and (perhaps) related to #5400.

comment:4 Changed 5 years ago by simonpj

Last edited 4 years ago by simonpj (previous) (diff)
Note: See TracTickets for help on using tickets.