Skip to main content

Non-monadic Models of Mutable References

  • Chapter
Central European Functional Programming School (CEFP 2009)

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

Included in the following conference series:

  • 636 Accesses

Abstract

Pointers are known as mutable references in pure functional programming languages. In Haskell, IO-references and ST-references are the well-known monadic models of references. This paper propose a model of mutable references based on unique heaps. This model put less restriction on the evaluation order of basic reference operations. Moreover it has simpler, more tractable semantics and it supports features like shared references between heaps and virtual union of heaps.

The proposed model needs uniqueness typing. This need could be seen as a drawback but it can also be seen as a motivation for the spread of uniqueness typing in functional languages.

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. The Clean compiler sources, http://clean.cs.ru.nl/Download/download.html

  2. The Haskell Adaptive package, http://hackage.haskell.org/package/Adaptive

  3. The Haskell ArrayRef package, http://hackage.haskell.org/package/ArrayRef

  4. The Haskell base package, http://hackage.haskell.org/package/base

  5. The Haskell stateref package, http://hackage.haskell.org/package/stateref

  6. Barendsen, E., Smetsers, S.: Uniqueness typing for functional languages with graph rewriting semantics. Mathematical Structures in Computer Science 6(6), 579–612 (1996)

    MathSciNet  MATH  Google Scholar 

  7. de Vries, E., Plasmeijer, R., Abrahamson, D.M.: Uniqueness typing simplified. In: Chitil, O., Horváth, Z., Zsók, V. (eds.) IFL 2007. LNCS, vol. 5083, pp. 201–218. Springer, Heidelberg (2008)

    Chapter  Google Scholar 

  8. Fluet, M., Morrisett, G.: Monadic regions. SIGPLAN Not. 39(9), 103–114 (2004)

    Article  MATH  Google Scholar 

  9. Jones, M.P.: Type classes with functional dependencies. In: Smolka, G. (ed.) ESOP 2000. LNCS, vol. 1782, pp. 230–244. Springer, Heidelberg (2000)

    Chapter  Google Scholar 

  10. Jones, S.P.: Tackling the awkward squad: monadic input/output, concurrency, exceptions, and foreign-language calls in haskell

    Google Scholar 

  11. Launchbury, J., Jones, S.L.P.: Lazy functional state threads. SIGPLAN Not. 29(6), 24–35 (1994)

    Article  Google Scholar 

  12. Lippmeier, B.: Type inference and optimisation for an impure world. PhD thesis, Australian National University (2009)

    Google Scholar 

  13. Läufer, K., Odersky, M.: Polymorphic type inference and abstract data types. ACM Transactions on Programming Languages and Systems 16 (1994)

    Google Scholar 

  14. Jones, S.P., et al.: The Haskell 98 language and libraries: The revised report. Journal of Functional Programming 13(1),0-255 (2003), http://www.haskell.org/definition/

  15. Jones, S.P., Hughes, J., et al.: Report on the Programming Language Haskell 98, A Non-strict, Purely Functional Language (February 1999)

    Google Scholar 

  16. Plasmeijer, R., Achten, P., Koopman, P.: itasks: executable specifications of interactive work flow systems for the web. SIGPLAN Not. 42, 141–152 (2007)

    Article  Google Scholar 

  17. Plasmeijer, R., van Eekelen, M.: Concurrent Clean Version 2.0 Language Report (2001)

    Google Scholar 

  18. Schrijvers, T., Jones, S.P., Chakravarty, M., Sulzmann, M.: Type checking with open type functions. In: ICFP 2008: Proceeding of the 13th ACM SIGPLAN international conference on Functional programming, , pp. 51–62. ACM, New York (2008)

    Google Scholar 

  19. Swierstra, W., Altenkirch, T.: Beauty in the beast: A functional semantics for the awkward squad. In:Haskell 2007: Proceedings of the ACM SIGPLAN workshop on Haskell workshop, pp. 25–36. ACM, New York (2007)

    Chapter  Google Scholar 

  20. Wadler, P.: How to declare an imperative. ACM Comput. Surv. 29(3), 240–263 (1997)

    Article  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 chapter

Cite this chapter

Diviánszky, P. (2010). Non-monadic Models of Mutable References. In: Horváth, Z., Plasmeijer, R., Zsók, V. (eds) Central European Functional Programming School. CEFP 2009. Lecture Notes in Computer Science, vol 6299. Springer, Berlin, Heidelberg. https://doi.org/10.1007/978-3-642-17685-2_5

Download citation

  • DOI: https://doi.org/10.1007/978-3-642-17685-2_5

  • Publisher Name: Springer, Berlin, Heidelberg

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

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

  • eBook Packages: Computer ScienceComputer Science (R0)

Publish with us

Policies and ethics