Call Arity. (June 2018) - Breitner, Joachim
Highlights: A new arity analysis, precise in the precense of recursion, due to a novel cardinality analysis. Solves a long-standing open problem with list fusion. Program performance benchmark results that demonstrate its usefulness. Notes on the implementation of Call Arity in the Haskell compiler GHC. Abstract: Higher order combinators in functional programming languages can lead to code that would be considerably more efficient if some functions' definitions were eta-expanded. Previous analyses were not always precise enough to allow that. In particular, this has preventedfoldl from efficiently taking part in list fusion. Call Arity is an analysis that eta-expands functions according to how they are used. By virtue of using a new cardinality analysis based on the notion of co-call graphs, it is sufficiently precise even in the presence of recursion, and its inclusion in the Haskell compiler GHC now enables the fusion offoldl -based combinators.