Skip to main content

Applicative Shortcut Fusion

  • Conference paper
Trends in Functional Programming (TFP 2011)

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

Included in the following conference series:

Abstract

In functional programming one usually writes programs as the composition of simpler functions. Consequently, the result of a function might be generated only to be consumed immediately by another function. This potential source of inefficiency can often be eliminated using a technique called shortcut fusion, which fuses both functions involved in a composition to yield a monolithic one. In this article we investigate how to apply shortcut fusion to applicative computations. Applicative functors provide a model of computational effects which generalise monads, but they favour an applicative programming style. To the best of our knowledge, this is the first time shortcut fusion is considered in an applicative setting.

This is a preview of subscription content, log in via an institution to check access.

Access this chapter

Chapter
USD 29.95
Price excludes VAT (USA)
  • Available as PDF
  • Read on any device
  • Instant download
  • Own it forever
eBook
USD 54.99
Price excludes VAT (USA)
  • Available as PDF
  • Read on any device
  • Instant download
  • Own it forever
Softcover Book
USD 72.00
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

Institutional subscriptions

Preview

Unable to display preview. Download preview PDF.

Unable to display preview. Download preview PDF.

References

  1. Abramsky, S., Jung, A.: Domain Theory. In: Abramsky, S., Gabbay, D., Maibaum, T.S.E. (eds.) Handbook of Logic in Computer Science, vol. 3, pp. 1–168. Oxford University Press (1994)

    Google Scholar 

  2. Backhouse, R., Jansson, P., Jeuring, J., Meertens, L.: Generic Programming — An Introduction. In: Swierstra, S.D., Oliveira, J.N. (eds.) AFP 1998. LNCS, vol. 1608, pp. 28–115. Springer, Heidelberg (1999)

    Chapter  Google Scholar 

  3. Bird, R., de Moor, O.: Algebra of programming. Prentice-Hall, Inc., Upper Saddle River (1997)

    MATH  Google Scholar 

  4. Bird, R.S.: Introduction to Functional Programming Using Haskell. Prentice-Hall (1998)

    Google Scholar 

  5. Fernandes, J.P., Pardo, A., Saraiva, J.: A shortcut fusion rule for circular program calculation. In: Keller, G. (ed.) Haskell, pp. 95–106. ACM (2007)

    Google Scholar 

  6. Ghani, N., Johann, P.: Monadic augment and generalised short cut fusion. Journal of Functional Programming 17(6), 731–776 (2007)

    Article  MathSciNet  MATH  Google Scholar 

  7. Ghani, N., Johann, P.: Short cut fusion of recursive programs with computational effects. In: Achten, P., Koopman, P., Morazán, M. (eds.) Trends in Functional Programming. Trends in Functional Programming, Intellect, vol. 9, pp. 113–128 (2009) ISBN 978-1-84150-277-9

    Google Scholar 

  8. Ghani, N., Uustalu, T., Vene, V.: Build, Augment and Destroy, Universally. In: Chin, W.-N. (ed.) APLAS 2004. LNCS, vol. 3302, pp. 327–347. Springer, Heidelberg (2004)

    Chapter  Google Scholar 

  9. Gibbons, J.: Datatype-Generic Programming. In: Backhouse, R., Gibbons, J., Hinze, R., Jeuring, J. (eds.) SSDGP 2006. LNCS, vol. 4719, pp. 1–71. Springer, Heidelberg (2007)

    Chapter  Google Scholar 

  10. Gibbons, J., Oliveira, B.C.d.S.: The essence of the iterator pattern. Journal of Functional Programming 19(3-4), 377–402 (2009)

    Article  MathSciNet  MATH  Google Scholar 

  11. Gill, A., Launchbury, J., Peyton Jones, S.: A short cut to deforestation. In: FPCA 1993: Proceedings of the Conference on Functional Programming Languages and Computer Architecture, pp. 223–232. ACM Press, New York (1993)

    Chapter  Google Scholar 

  12. Hughes, J.: Why functional programming matters. Comput. J. 32(2), 98–107 (1989)

    Article  Google Scholar 

  13. Johann, P., Ghani, N.: Monadic fold, monadic build, monadic short cut fusion. In: Proceedings of the 10th Symposium on Trends in Functional Programming (TFP 2009), pp. 9–23 (2009)

    Google Scholar 

  14. Manzino, C., Pardo, A.: Shortcut fusion of monadic programs. Journal of Universal Computer Science 14(21), 3431–3446 (2008)

    MATH  Google Scholar 

  15. Martínez, M., Pardo, A.: A shortcut fusion approach to accumulations. In: Simpósio Brasileiro de Linguagens de Programacao, SBLP 2009 (2009)

    Google Scholar 

  16. McBride, C., Paterson, R.: Applicative programming with effects. Journal of Functional Programming 18(01), 1–13 (2008)

    Article  MATH  Google Scholar 

  17. Meertens, L.: Functor pulling. In: Backhouse, R., Sheard, T. (eds.) Proc. Workshop on Generic Programming (1998)

    Google Scholar 

  18. Meijer, E., Fokkinga, M.M., Paterson, R.: Functional Programming with Bananas, Lenses, Envelopes and Barbed Wire. In: Hughes, J. (ed.) FPCA 1991. LNCS, vol. 523, pp. 124–144. Springer, Heidelberg (1991)

    Chapter  Google Scholar 

  19. Pardo, A., Fernandes, J.P., Saraiva, J.: Shortcut fusion rules for the derivation of circular and higher-order monadic programs. In: Puebla, G., Vidal, G. (eds.) PEPM, pp. 81–90. ACM (2009)

    Google Scholar 

  20. Takano, A., Meijer, E.: Shortcut deforestation in calculational form. In: Proc. Conference on Functional Programming Languages and Computer Architecture, pp. 306–313. ACM Press (1995)

    Google Scholar 

  21. Wadler, P.: Theorems for Free! In: Proceedings of the 4th ACM Conference on Functional Programming Languages and Computer Architecture, FPCA 1989, pp. 347–359. ACM Press, New York (1989)

    Chapter  Google Scholar 

Download references

Author information

Authors and Affiliations

Authors

Editor information

Editors and Affiliations

Rights and permissions

Reprints and permissions

Copyright information

© 2012 Springer-Verlag Berlin Heidelberg

About this paper

Cite this paper

Delbianco, G.A., Jaskelioff, M., Pardo, A. (2012). Applicative Shortcut Fusion. In: Peña, R., Page, R. (eds) Trends in Functional Programming. TFP 2011. Lecture Notes in Computer Science, vol 7193. Springer, Berlin, Heidelberg. https://doi.org/10.1007/978-3-642-32037-8_12

Download citation

  • DOI: https://doi.org/10.1007/978-3-642-32037-8_12

  • Publisher Name: Springer, Berlin, Heidelberg

  • Print ISBN: 978-3-642-32036-1

  • Online ISBN: 978-3-642-32037-8

  • eBook Packages: Computer ScienceComputer Science (R0)

Publish with us

Policies and ethics