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, but the existing analyses are not always precise enough to allow that. In particular, this has prevented \( foldl \) from efficiently taking part in list fusion.
Call Arity is an analysis that eta-expands functions based on their uses, instead of their definitions, and is very precise in the presence of recursion. Its inclusion in GHC now allows to fuse \( foldl \)-based combinators.
This is a preview of subscription content, log in via an institution.
Buying options
Tax calculation will be finalised at checkout
Purchases are for personal use only
Learn about institutional subscriptionsPreview
Unable to display preview. Download preview PDF.
References
Breitner, J.: The correctness of Launchbury’s natural semantics for lazy evaluation. Archive of Formal Proofs (January 2013) http://afp.sf.net/entries/Launchbury.shtml. Formal proof development
Coutts, D.: Stream Fusion: Practical shortcut fusion for coinductive sequence types. PhD thesis, University of Oxford (2010)
Coutts, D., Leshchinskiy, R., Stewart, D.: Stream fusion. from lists to streams to nothing at all. In: ICFP (2007)
Farmer, A., Höner zu Siederdissen, C., Gill, A.: The HERMIT in the Stream: Fusing Stream Fusion’s concatmap. In: PEPM (2014)
Gill, A.J.: Cheap deforestation for non-strict functional languages. PhD thesis, University of Glasgow (1996)
Hage, J., Holdermans, S., Middelkoop, A.: A generic usage analysis with subeffect qualifiers. In: ICFP, pp. 235–246 (2007)
Launchbury, J.: A natural semantics for lazy evaluation. In: POPL (1993)
Marlow, S., Peyton Jones, S.L.: Making a fast curry: push/enter vs. eval/apply for higher-order languages. Journal of Functional Programming 16(4–5), 415–449 (2006)
Partain, W.: The nofib benchmark suite of haskell programs. In: Functional Programming (1992)
Sergey, I., Vytiniotis, D., Peyton Jones, S.: Modular, Higher-order Cardinality Analysis in Theory and Practice. In: POPL (2014)
Svenningsson, J.: Shortcut fusion for accumulating parameters & zip-like functions. In: ICFP (2002)
Takano, A.: Worker-wrapper fusion. https://github.com/takano-akio/ww-fusion. Prototype
Xu, D.N., Peyton Jones, S.: Arity analysis (2005). Working Notes
Author information
Authors and Affiliations
Corresponding author
Editor information
Editors and Affiliations
Rights and permissions
Copyright information
© 2015 Springer International Publishing Switzerland
About this paper
Cite this paper
Breitner, J. (2015). Call Arity. In: Hage, J., McCarthy, J. (eds) Trends in Functional Programming. TFP 2014. Lecture Notes in Computer Science(), vol 8843. Springer, Cham. https://doi.org/10.1007/978-3-319-14675-1_3
Download citation
DOI: https://doi.org/10.1007/978-3-319-14675-1_3
Published:
Publisher Name: Springer, Cham
Print ISBN: 978-3-319-14674-4
Online ISBN: 978-3-319-14675-1
eBook Packages: Computer ScienceComputer Science (R0)