Skip to content

Disabling case-of-bottom leads to simplifier loop

While working on #17760 (closed) I noticed that disabling the simplifier's case-of-bottom transform results in the simplifier running out of ticks while compiling GHC.Tc.Deriv.Generics:

Simplifier ticks exhausted                                                                
  When trying UnfoldingDone nlHsVarApps1       
  To increase the limit, use -fsimpl-tick-factor=N (default 100).
                                                
  If you need to increase the limit substantially, please file a
  bug report and indicate the factor you needed.                                          
                                                                                          
  If GHC was unable to complete compilation even with a very large factor
  (a thousand or more), please consult the "Known bugs or infelicities"
  section in the Users Guide before filing a report. There are a
  few situations unlikely to occur in practical programs for which
  simplifier non-termination has been judged acceptable.                                  
                                           
  To see detailed counts use -ddump-simpl-stats                                           
  Total ticks: 276647                                    

This is the case even if the tick factor is increased. This can be reproduced by building the wip/T18745 branch.

Edited by Ben Gamari
To upload designs, you'll need to enable LFS and have an admin enable hashed storage. More information