Skip to content
  • Simon Peyton Jones's avatar
    Re-do the arity calculation mechanism again (fix Trac #3959) · 63595209
    Simon Peyton Jones authored
    After rumination, yet again, on the subject of arity calculation,
    I have redone what an ArityType is (it's purely internal to the
    CoreArity module), and documented it better.  The result should
    fix #3959, and I hope the related #3961, #3983.
    
    There is lots of new documentation: in particular
     * Note [ArityType]  
       describes the new datatype for arity info
    
     * Note [State hack and bottoming functions] 
       says how bottoming functions are dealt with, particularly
       covering catch# and Trac #3959
    
    I also found I had to be careful not to eta-expand single-method
    class constructors; see Note [Newtype classes and eta expansion].
    I think this part could be done better, but it works ok.
    63595209