Skip to content
  • Simon Peyton Jones's avatar
    Fix loss-of-SpecConstr bug · 9e47dc45
    Simon Peyton Jones authored
    This bug, reported in Trac #13623 has been present since
    
      commit b8b3e30a
      Author: Edward Z. Yang <ezyang@cs.stanford.edu>
      Date:   Fri Jun 24 11:03:47 2016 -0700
    
          Axe RecFlag on TyCons.
    
    SpecConstr tries not to specialise indefinitely, and had a
    limit (see Note [Limit recursive specialisation]) that made
    use of info about whether or not a data constructor was
    "recursive".  This info vanished in the above commit, making
    the limit fire much more often -- and indeed it fired in this
    test case, in a situation where specialisation is /highly/
    desirable.
    
    I refactored the test, to look instead at the number of
    iterations of the loop of "and now specialise calls that
    arise from the specialisation".  Actually less code, and
    more robust.
    
    I also added record field names to a couple of constructors,
    and renamed RuleInfo to SpecInfo.
    9e47dc45