Skip to main content

Stretching the Storage Manager: Weak Pointers and Stable Names in Haskell

  • Conference paper
Implementation of Functional Languages (IFL 1999)

Part of the book series: Lecture Notes in Computer Science ((LNCS,volume 1868))

Included in the following conference series:

Abstract

Every now and then, a user of the Glasgow Haskell Compiler asks for a feature that requires specialised support from the storage manager. Memo functions, pointer equality, external pointers, finalizers, and weak pointers, are all examples.

We take memo functions as our exemplar because they turn out to be the trickiest to support. We present no fewer than four distinct mechanisms that are needed to support memo tables, and that (in various combinations) satisfy a variety of other needs.

The resulting set of primitives is undoubtedly powerful and useful. Whether they are too powerful is not yet clear. While the focus of our discussion is on Haskell, there is nothing Haskell-specific about most of the primitives, which could readily be used in other settings.

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. Cook, B., Launchbury, J.: Disposable memo functions. In: Proceedings of the 1997 Haskell Workshop (1997)

    Google Scholar 

  2. Dybvig, R., Bruggeman, C., Elby, D.: Guardians in a generation-based garbage collector. In: SIGPLAN Symposium on Programming Language Design and Implementation (PLDI 1993), Albuquerque, pp. 207–216 (June 1993)

    Google Scholar 

  3. Hayes, B.: Finalization in the collector interface. In: Bekkers, Y., Cohen, J. (eds.) IWMM-GIAE 1992. LNCS, vol. 637, pp. 277–298. Springer, Heidelberg (1992)

    Chapter  Google Scholar 

  4. Hayes, B.: Ephemerons: a new finalization mechanism. In: Proceedings ACM Con- ference on Object-Oriented Programming, Systems, Languages, and Applications (OOPSLA 1997), pp. 176–183. ACM, New York (1997)

    Chapter  Google Scholar 

  5. Hughes, R.: Lazy memo-functions. In: Proc. Aspenas workshop on implementation of functional languages (February 1985)

    Google Scholar 

  6. Java Software, Sun Microsystems, Inc., Java Development Kit 1.2 Documentation, http://java.sun.com/docs/

  7. Keller, R., Sleep, M.: Applicative caching. ACM Transactions on Programming Languages and Systems 8, 88–108 (1986)

    Article  MATH  Google Scholar 

  8. Lester, D.: An efficient distributed garbage-collection algorithm. In: Odijk, E., Syre, J.-C., Rem, M. (eds.) PARLE 1989. LNCS, vol. 365, pp. 207–223. Springer, Heidelberg (1989)

    Google Scholar 

  9. Peyton Jones, S.L., Gordon, A.J., Finne, S.O.: Concurrent Haskell. In: 23rd ACM Symposium on Principles of Programming Languages, St. Petersburg Beach, Florida, pp. 295–308. ACM, New York (1996)

    Google Scholar 

  10. Peyton Jones, S.L., Wadler, P.L.: Imperative functional programming. In: 20th ACM Symposium on Principles of Programming Languages (POPL 1993), Charleston, pp. 71–84. ACM, New York (1993)

    Chapter  Google Scholar 

  11. Trinder, P., Hammond, K., Mattson, J., Partridge, A., Jones, S.P.: GUM: a portable parallel implementation of Haskell. In: SIGPLAN Symposium on Programming Language Design and Implementation (PLDI 1996), Philadelphia. ACM, New York (1996)

    Google Scholar 

Download references

Author information

Authors and Affiliations

Authors

Editor information

Editors and Affiliations

Rights and permissions

Reprints and permissions

Copyright information

© 2000 Springer-Verlag Berlin Heidelberg

About this paper

Cite this paper

Peyton Jones, S., Marlow, S., Elliott, C. (2000). Stretching the Storage Manager: Weak Pointers and Stable Names in Haskell. In: Koopman, P., Clack, C. (eds) Implementation of Functional Languages. IFL 1999. Lecture Notes in Computer Science, vol 1868. Springer, Berlin, Heidelberg. https://doi.org/10.1007/10722298_3

Download citation

  • DOI: https://doi.org/10.1007/10722298_3

  • Publisher Name: Springer, Berlin, Heidelberg

  • Print ISBN: 978-3-540-67864-9

  • Online ISBN: 978-3-540-44658-3

  • eBook Packages: Springer Book Archive

Publish with us

Policies and ethics