Skip to main content

Stream Fusion on Haskell Unicode Strings

  • Conference paper
Implementation and Application of Functional Languages (IFL 2009)

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

  • 342 Accesses

Abstract

Prior papers have presented a fusion framework called stream fusion for removing intermediate data structures from both lists and arrays in Haskell. Stream fusion is unique in using an explicit datatype to accomplish fusion. We demonstrate how this can be exploited in the creation of a new Haskell string representation Text, which achieves better performance and data density than String. Text uses streams not only to accomplish fusion, but also as a way to abstract away from various underlying representations. This allows the same set of combinators to manipulate Unicode text that is stored in a variety of ways.

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 39.99
Price excludes VAT (USA)
  • Available as PDF
  • Read on any device
  • Instant download
  • Own it forever
Softcover Book
USD 54.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

Institutional subscriptions

Preview

Unable to display preview. Download preview PDF.

Unable to display preview. Download preview PDF.

References

  1. Peyton-Jones, S.: The Haskell 98 Report (2002)

    Google Scholar 

  2. The GHC Team: The Glorious Glasgow Haskell Compilation System User’s Guide, Version 6.12.1

    Google Scholar 

  3. Coutts, D., Stewart, D., Leshchinskiy, R.: Rewriting Haskell Strings. In: Hanus, M. (ed.) PADL 2007. LNCS, vol. 4354, pp. 50–64. Springer, Heidelberg (2006)

    Chapter  Google Scholar 

  4. Coutts, D., Leshchinskiy, R., Stewart, D.: Stream Fusion: From Lists to Streams to Nothing At All. In: ICFP 2007. ACM, New York (October 2007)

    Google Scholar 

  5. The Unicode Consortium: The Unicode Standard, Version 5.2.0 (2010)

    Google Scholar 

  6. Gill, A., Launchbury, J., Peyton-Jones, S.: A Short Cut to Deforestation. In: ICFP 1993, pp. 223–232. ACM, New York (1993)

    Google Scholar 

  7. Svenningsson, J.: Shortcut fusion for accumulating parameters & zip-like functions. In: ICFP 2002, pp. 124–132. ACM, New York (2002)

    Google Scholar 

  8. Petyon-Jones, S., Tolmach, A., Hoare, T.: Playing by the Rules: Rewriting as a practical optimisation technique in GHC. In: Haskell Workshop, ACM SIGPLAN, pp. 203–233 (2001)

    Google Scholar 

  9. Harper, T.: Fusion on Haskell Unicode Strings, Master’s Thesis, University of Oxford (2008)

    Google Scholar 

  10. Claessen, K., Hughes, J.: QuickCheck: a lightweight tool for random testing of Haskell programs. In: ICFP 2000. ACM, New York (2000)

    Google Scholar 

  11. Hinze, R., Paterson, R.: Finger trees: a simple general-purpose data structure. Journal of Functional Programming 16(2) (2006)

    Google Scholar 

  12. Boehm, H.J., Atkinson, R., Plass, M.: Ropes: an Alternative to Strings. Software: Practice and Experience 25(12), 1315–1330 (1995)

    Google Scholar 

Download references

Author information

Authors and Affiliations

Authors

Editor information

Editors and Affiliations

Rights and permissions

Reprints and permissions

Copyright information

© 2010 Springer-Verlag Berlin Heidelberg

About this paper

Cite this paper

Harper, T. (2010). Stream Fusion on Haskell Unicode Strings. In: Morazán, M.T., Scholz, SB. (eds) Implementation and Application of Functional Languages. IFL 2009. Lecture Notes in Computer Science, vol 6041. Springer, Berlin, Heidelberg. https://doi.org/10.1007/978-3-642-16478-1_8

Download citation

  • DOI: https://doi.org/10.1007/978-3-642-16478-1_8

  • Publisher Name: Springer, Berlin, Heidelberg

  • Print ISBN: 978-3-642-16477-4

  • Online ISBN: 978-3-642-16478-1

  • eBook Packages: Computer ScienceComputer Science (R0)

Publish with us

Policies and ethics