Skip to content
  • Simon Peyton Jones's avatar
    Ensure that loop breakers are computed when glomming · 5fa6e759
    Simon Peyton Jones authored
    This patch fixes Trac #9583, a loop in the simplifier.
    
    I thought this was going to be very complicated but it turned out to
    be very simple!  The occurrence analyser does something called
    "glomming" if the application of imported RULES means that something
    that didn't look recursive becomes recursive.  See `Note [Glomming]`
    in `OccurAnal`.  Under these circumstances we group all the top-level
    bindings into a single massive `Rec`.
    
    But, crucially, I failed to repeat the occurrence analysis on this
    glommed set of bindings.  That means that we weren't establishing the
    right loop breakers (indeed there were no loop breakers whatsoever),
    and that led immediately to the loop. The only surprising this is that
    it didn't happen before.
    5fa6e759