Skip to main content

Orthogonal Serialisation for Haskell

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

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

Included in the following conference series:

Abstract

Data serialisation is a crucial feature of real-world programming languages, often provided by standard libraries or even built-in to the language. However, a number of questions arise when the language in question uses demand-driven evaluation and supports higher-order functions, as is the case for the lazy functional language Haskell. To date, solutions to serialisation for Haskell generally do not support higher-order functions and introduce additional strictness.

This paper investigates a novel approach to serialisation of Haskell data structures with a high degree of flexibility, based on runtime support for parallel Haskell on distributed memory platforms. This serialisation has highly desirable and so-far unrivalled properties: it is truly orthogonal to evaluation and also does not require any type class mechanisms. Especially, (almost) any kind of value can be serialised, including functions and IO actions. We outline the runtime support on which our serialisation is based, and present an API of Haskell functions and types which ensure dynamic type safety of the serialisation process. Furthermore, we explore and exemplify potential application areas for orthogonal serialisation.

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 69.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. Augustsson, L.: Personal communication, about a possible Haskell serialisation feature, during the Haskell Symposium (September 2009)

    Google Scholar 

  2. Berthold, J.: Explicit and implicit parallel functional programming: Concepts and implementation. Ph.D. thesis, Philipps-Universität Marburg, Germany (June 2008), http://archiv.ub.uni-marburg.de/diss/z2008/0547/

  3. Berthold, J., Loidl, H.W., Al Zain, A.: Scheduling Light-Weight Parallelism in ArTCoP. In: Hudak, P., Warren, D. (eds.) PADL 2008. LNCS, vol. 4902, pp. 214–229. Springer, Heidelberg (2008)

    Chapter  Google Scholar 

  4. Berthold, J., Loogen, R.: Parallel Coordination Made Explicit in a Functional Setting. In: Horváth, Z., Zsók, V., Butterfield, A. (eds.) IFL 2006. LNCS, vol. 4449, pp. 73–90. Springer, Heidelberg (2007)

    Chapter  Google Scholar 

  5. Claessen, K.: Memoisation module based on Haskell generics, http://www.cse.chalmers.se/~ms/TR0912/Memo.hs (accessed 2010-03-15)

  6. Corona, A.: Refserialize-0.2.7: Write to and read from Strings maintaining internal memory references. Haskell Library on Hackage, http://hackage.haskell.org/package/RefSerialize (accessed 2010-10-21)

  7. Davie, T., Hammond, K., Quintela, J.: Efficient Persistent Haskell. In: Clack, C., Hammond, K., Davie, T. (eds.) IFL 1998 – Draft Proceedings, London, UK (September 1998)

    Google Scholar 

  8. Elliott, C.: Memo trie library. Haskell Library on Hackage, http://hackage.haskell.org/package/MemoTrie (accessed 2010-10-20)

  9. Marlow, S.: Haskell 2010 Language Report (June 2010), http://www.haskell.org/

  10. Haskell Hierarchical Libraries: Base library, version 4.2.0.2. Haskell Library on Hackage, http://hackage.haskell.org/package/base (accessed 2010-10-21)

  11. Haskell Wiki. Wiki, http://www.haskell.org/haskellwiki/ (accessed 2010-10-20)

  12. Haskell Café: Discussion on “bulk synchronous parallel”, http://www.haskell.org/pipermail/haskell-cafe/2010-April/076593.html (accessed 2010-07-20)

  13. Haskell Café: Discussion on “how to serialize thunks?”, http://www.haskell.org/pipermail/haskell-cafe/2006-December/020786.html (accessed 2010-07-23)

  14. Haskell Café: Discussion “persist and retrieve of IO type?”, http://www.haskell.org/pipermail/haskell-cafe/2010-April/076121.html (accessed 2010-07-20)

  15. Hinze, R.: Memo functions, polytypically! In: Jeuring, J. (ed.) Proc. of 2nd Workshop on Generic Programming, WGP 2000, Ponte de Lima, Portugal, pp. 17–32 (July 2000); Tech. Report UU-CS-2000-19, Utrecht Universiteit

    Google Scholar 

  16. Lämmel, R., Jones, S.P.: Scrap your boilerplate: a practical design pattern for generic programming. ACM SIGPLAN Notices 38(3), 26–37 (2003)

    Article  Google Scholar 

  17. Loogen, R., Ortega-Mallén, Y., Peña-Marí, R.: Parallel Functional Programming in Eden. Journal of Functional Programming 15(3), 431–475 (2005)

    Article  MATH  Google Scholar 

  18. McNally, D.J.: Models for Persistence in Lazy Functional Programming. Ph.D. thesis, University of St.Andrews (1993)

    Google Scholar 

  19. McNally, D.J., Davie, A.J.T.: Two models for integrating persistence and lazy functional languages. ACM SIGPLAN Notices 26(5), 43–52 (1991)

    Article  Google Scholar 

  20. Michie, D.: ‘Memo’ functions and machine learning. Nature 218, 19–22 (1968)

    Article  Google Scholar 

  21. Palmer, L.: Memo combinator library (data-memocombinators). Haskell Library on Hackage, http://hackage.haskell.org/package/data-memocombinators (accessed 2010-10-20)

  22. Peyton Jones, S.: Tackling the Awkward Squad: monadic input/output, concurrency, exceptions, and foreign-language calls in Haskell (2002), http://research.microsoft.com/~simonpj/

  23. Plasmeier, R.J., Koopman, P.: Personal communication (September 2010), about the Clean Dynamics implementation in practical use and its pragmatic limitations, during IFL (2010)

    Google Scholar 

  24. Quintela, J.J., Sánchez, J.J.: Persistent Haskell. In: Moreno-Díaz, R., Buchberger, B., Freire, J.L. (eds.) EUROCAST 2001. LNCS, vol. 2178, pp. 657–667. Springer, Heidelberg (2001); presented earlier, at IFL 1998, as [7]

    Chapter  Google Scholar 

  25. Santos, A., Abdon Monteiro, B.: A Persistence Library for Haskell. In: Musicante, M.A., Haeusler, E.H. (eds.) Proceedings of SBLP 2001 - V Simpósio Brasileiro de Linguagens de Programação, Curitiba (May 2001)

    Google Scholar 

  26. Trinder, P., Hammond, K., Mattson Jr., J., Partridge, A., Peyton Jones, S.: GUM: a Portable Parallel Implementation of Haskell. In: PLDI 1996, pp. 78–88. ACM Press, Philadephia (1996)

    Google Scholar 

  27. Vervoort, M., Plasmeijer, R.J.: Lazy Dynamic Input/Output in the Lazy Functional Language Clean. In: Peña, R., Arts, T. (eds.) IFL 2002. LNCS, vol. 2670, pp. 101–117. Springer, Heidelberg (2003)

    Chapter  Google Scholar 

Download references

Author information

Authors and Affiliations

Authors

Editor information

Editors and Affiliations

Rights and permissions

Reprints and permissions

Copyright information

© 2011 Springer-Verlag Berlin Heidelberg

About this paper

Cite this paper

Berthold, J. (2011). Orthogonal Serialisation for Haskell. In: Hage, J., Morazán, M.T. (eds) Implementation and Application of Functional Languages. IFL 2010. Lecture Notes in Computer Science, vol 6647. Springer, Berlin, Heidelberg. https://doi.org/10.1007/978-3-642-24276-2_3

Download citation

  • DOI: https://doi.org/10.1007/978-3-642-24276-2_3

  • Publisher Name: Springer, Berlin, Heidelberg

  • Print ISBN: 978-3-642-24275-5

  • Online ISBN: 978-3-642-24276-2

  • eBook Packages: Computer ScienceComputer Science (R0)

Publish with us

Policies and ethics