Opened 7 months ago

Closed 7 months ago

#8381 closed bug (wontfix)

Simplifier ticks exhausted

Reported by: guest Owned by:
Priority: normal Milestone:
Component: Compiler Version: 7.6.3
Keywords: Cc:
Operating System: MacOS X Architecture: x86_64 (amd64)
Type of failure: Compile-time crash Difficulty: Unknown
Test Case: Blocked By:
Blocking: Related Tickets:


Trying to build a (rather simple) project using cabal I get the following error message on a valid program:

ghc: panic! (the 'impossible' happened)

(GHC version 7.6.3 for i386-apple-darwin):

Simplifier ticks exhausted

When trying UnfoldingDone? a_syQ{v} [lid]
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: 5080

I tried to increase the limit without success.

More oddly if I try to build directly the program using ghc (same version) it succeeds, therefore I suspect that cabal is somehow the source of my problem.

Attachments (1)

set2- (17.2 KB) - added by guest 7 months ago.
The project tarball

Download all attachments as: .zip

Change History (2)

Changed 7 months ago by guest

The project tarball

comment:1 Changed 7 months ago by monoidal

  • Resolution set to wontfix
  • Status changed from new to closed

The problem is caused by compiling ghc -O Fix, where Fix is

data F a = F { unF :: F a -> a }

y :: (a -> a) -> a
y = \f -> (\x -> f (unF x x)) (F (\x -> f (unF x x)))

Unfortunately, GHC's inliner is known to get stuck with recursion expressed this way. This is documented at You can write y in a different way, for example

y f = let x = f x in x

and then the program works. Since there is an already-documented issue, and here it can be bypassed, I am closing as 'wontfix'. However, as the documentation says - if you find a different, non-contrived way to get this error, please reopen or create a new ticket.

Note: See TracTickets for help on using tickets.