Skip to main content

Call Arity

  • Conference paper
  • First Online:

Part of the book series: Lecture Notes in Computer Science ((LNTCS,volume 8843))

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

Chapter
USD   29.95
Price excludes VAT (USA)
  • Available as PDF
  • Read on any device
  • Instant download
  • Own it forever
eBook
USD   34.99
Price excludes VAT (USA)
  • Available as PDF
  • Read on any device
  • Instant download
  • Own it forever
Softcover Book
USD   44.99
Price excludes VAT (USA)
  • Compact, lightweight edition
  • Dispatched in 3 to 5 business days
  • Free shipping worldwide - see info

Tax calculation will be finalised at checkout

Purchases are for personal use only

Learn about institutional subscriptions

Preview

Unable to display preview. Download preview PDF.

Unable to display preview. Download preview PDF.

References

  1. 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

  2. Coutts, D.: Stream Fusion: Practical shortcut fusion for coinductive sequence types. PhD thesis, University of Oxford (2010)

    Google Scholar 

  3. Coutts, D., Leshchinskiy, R., Stewart, D.: Stream fusion. from lists to streams to nothing at all. In: ICFP (2007)

    Google Scholar 

  4. Farmer, A., Höner zu Siederdissen, C., Gill, A.: The HERMIT in the Stream: Fusing Stream Fusion’s concatmap. In: PEPM (2014)

    Google Scholar 

  5. Gill, A.J.: Cheap deforestation for non-strict functional languages. PhD thesis, University of Glasgow (1996)

    Google Scholar 

  6. Hage, J., Holdermans, S., Middelkoop, A.: A generic usage analysis with subeffect qualifiers. In: ICFP, pp. 235–246 (2007)

    Google Scholar 

  7. Launchbury, J.: A natural semantics for lazy evaluation. In: POPL (1993)

    Google Scholar 

  8. 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)

    Article  MATH  MathSciNet  Google Scholar 

  9. Partain, W.: The nofib benchmark suite of haskell programs. In: Functional Programming (1992)

    Google Scholar 

  10. Sergey, I., Vytiniotis, D., Peyton Jones, S.: Modular, Higher-order Cardinality Analysis in Theory and Practice. In: POPL (2014)

    Google Scholar 

  11. Svenningsson, J.: Shortcut fusion for accumulating parameters & zip-like functions. In: ICFP (2002)

    Google Scholar 

  12. Takano, A.: Worker-wrapper fusion. https://github.com/takano-akio/ww-fusion. Prototype

  13. Xu, D.N., Peyton Jones, S.: Arity analysis (2005). Working Notes

    Google Scholar 

Download references

Author information

Authors and Affiliations

Authors

Corresponding author

Correspondence to Joachim Breitner .

Editor information

Editors and Affiliations

Rights and permissions

Reprints 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)

Publish with us

Policies and ethics