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.
Access this chapter
Tax calculation will be finalised at checkout
Purchases are for personal use only
Preview
Unable to display preview. Download preview PDF.
References
Cook, B., Launchbury, J.: Disposable memo functions. In: Proceedings of the 1997 Haskell Workshop (1997)
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)
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)
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)
Hughes, R.: Lazy memo-functions. In: Proc. Aspenas workshop on implementation of functional languages (February 1985)
Java Software, Sun Microsystems, Inc., Java Development Kit 1.2 Documentation, http://java.sun.com/docs/
Keller, R., Sleep, M.: Applicative caching. ACM Transactions on Programming Languages and Systems 8, 88–108 (1986)
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)
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)
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)
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)
Author information
Authors and Affiliations
Editor information
Editors and Affiliations
Rights 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