Skip to main content

A Simple Semantics for Polymorphic Recursion

  • Conference paper
Programming Languages and Systems (APLAS 2005)

Part of the book series: Lecture Notes in Computer Science ((LNPSE,volume 3780))

Included in the following conference series:

Abstract

Polymorphic recursion is a useful extension of Hindley- Milner typing and has been incorporated in the functional programming language Haskell. It allows the expression of efficient algorithms that take advantage of non-uniform data structures and provides key support for generic programming. However, polymorphic recursion is, perhaps, not as broadly understood as it could be and this, in part, motivates the denotational semantics presented here. The semantics reported here also contributes an essential building block to any semantics of Haskell: a model for first-order polymorphic recursion. Furthermore, Haskell-style type classes may be described within this semantic framework in a straightforward and intuitively appealing manner.

This research supported in part by subcontract GPACS0016, System Information Assurance II, through OGI/Oregon Health & Sciences University.

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. Cousot, P.: Types as abstract interpretations, invited paper. In: Conference Record of the Twentyfourth Annual ACM SIGPLAN-SIGACT Symposium on Principles of Programming Languages, Paris, France, January 1997, pp. 316–331. ACM Press, New York (1997)

    Google Scholar 

  2. Girard, J.-Y.: Proofs and Types. Cambridge Tracts in Theoretical Computer Science, vol. 7. Cambridge University Press, Cambridge (1989)

    MATH  Google Scholar 

  3. Gunter, C.A.: Semantics of Programming Languages: Structures and Techniques. MIT Press, Cambridge (1992)

    MATH  Google Scholar 

  4. Hall, C.V., Hammond, K., Jones, S.L.P., Wadler, P.L.: Type classes in Haskell. ACM Transactions on Programming Languages and Systems 18(2), 109–138 (1996)

    Article  Google Scholar 

  5. Harper, R., Mitchell, J.C.: On the type structure of standard ML. ACM Transactions on Programming Languages and Systems (TOPLAS) 15(2), 211–252 (1993)

    Article  Google Scholar 

  6. Harrison, W., Sheard, T., Hook, J.: Fine control of demand in Haskell. In: Boiten, E.A., Möller, B. (eds.) MPC 2002. LNCS, vol. 2386, pp. 68–93. Springer, Heidelberg (2002)

    Chapter  Google Scholar 

  7. Harrison, W.L., Kieburtz, R.B.: The logic of demand in Haskell. Journal of Functional Programming 15(5) (2005)

    Google Scholar 

  8. Henglein, F.: Type inference with polymorphic recursion. ACM Transactions on Programming Languages and Systems 15(2), 253–289 (1993)

    Article  Google Scholar 

  9. Hindley, R.J.: The principal type scheme of an object in combinatory logic. Transactions of the American Mathematical Society 146, 29–60 (1969)

    Article  MATH  MathSciNet  Google Scholar 

  10. Hinze, R.: A new approach to generic functional programming. In: POPL 2000: Proceedings of the 27th ACM SIGPLAN-SIGACT symposium on Principles of programming languages, pp. 119–132 (2000)

    Google Scholar 

  11. Hinze, R., Jeuring, J.: Generic haskell: Practice and theory. In: Backhouse, R., Gibbons, J. (eds.) Generic Programming. LNCS, vol. 2793, pp. 1–56. Springer, Heidelberg (2003)

    Chapter  Google Scholar 

  12. Jones, M.: Private communication

    Google Scholar 

  13. Jones, M.P.: A system of constructor classes: overloading and implicit higher-order polymorphism. In: Proceedings of the conference on Functional programming languages and computer architecture, pp. 52–61. ACM Press, New York (1993)

    Chapter  Google Scholar 

  14. Jones, M.P.: Dictionary-free overloading by partial evaluation. In: ACM SIGPLAN Workshop on Partial Evaluation and Semantics-Based Program Manipulation, Orlando, Florida (June 1994)

    Google Scholar 

  15. Jones, M.P.: Qualified Types: Theory and Practice. Cambridge University Press, Cambridge (1994)

    Book  MATH  Google Scholar 

  16. Kfoury, A.J., Tiuryn, J., Urzyczyn, P.: Type reconstruction in the presence of polymorphic recursion. ACM Transactions on Programming Languages and Systems 15(2), 290–311 (1993)

    Article  Google Scholar 

  17. MacQueen, D.B., Plotkin, G., Sethi, R.: An ideal model for recursive polymorphic types. Information and Control 71(1/2) (1984)

    Google Scholar 

  18. Milner, R.: A theory of type polymorphism in programming languages. Journal of Computer and System Science 17(3), 348–375 (1978)

    Article  MATH  MathSciNet  Google Scholar 

  19. Mitchell, J.C., Harper, R.: The essence of ML. In: Conference Record of the 15th Annual ACM Symposium on Principles of Programming Languages (POPL 1988), pp. 28–46 (1988)

    Google Scholar 

  20. Mitchell, J.C.: Foundations for Programming Languages, 3rd edn. MIT Press, Cambridge (2000)

    Google Scholar 

  21. Mycroft, A.: Polymorphic type schemes and recursive definitions. In: Paul, M., Robinet, B. (eds.) Programming 1984. LNCS, vol. 167, pp. 217–228. Springer, Heidelberg (1984)

    Google Scholar 

  22. Ohori, A.: A Simple Semantics for ML Polymorphism. In: Proceedings of the 4th International Conference on Functional Programming Languages and Computer Architecture, pp. 281–292. Imperial College, London (1989)

    Chapter  Google Scholar 

  23. Ohori, A.: A Study of Semantics, Types, and Languages for Databases and Object-oriented Programming. PhD thesis, University of Pennsylvania (1989)

    Google Scholar 

  24. Okasaki, C.: Purely Functional Data Structures. Cambridge University Press, Cambridge (1998)

    Book  Google Scholar 

  25. Jones, S.P. (ed.): Haskell 98 Language and Libraries, the Revised Report. Cambridge University Press, Cambridge (2003)

    Google Scholar 

  26. Reynolds, J.C.: Towards a theory of type structure. In: Robinet, B. (ed.) Programming Symposium. LNCS, vol. 19, pp. 408–425. Springer, Heidelberg (1974)

    Google Scholar 

  27. Stuckey, P.J., Sulzmann, M.: A theory of overloading. ACM Transactions on Programming Languages and Systems (TOPLAS) (2004), To appear in ACM Transactions on Programming Languages and Systems

    Google Scholar 

  28. Thatte, S.R.: Semantics of type classes revisited. In: Proceedings of the 1994 ACM conference on LISP and functional programming, pp. 208–219. ACM Press, New York (1994)

    Chapter  Google Scholar 

  29. Wadler, P., Blott, S.: How to make ad-hoc polymorphism less ad hoc. In: Sixteenth Annual ACM Symposium on Principles of Programming Languages, Austin, Texas, pp. 60–76 (1989)

    Google Scholar 

Download references

Author information

Authors and Affiliations

Authors

Editor information

Editors and Affiliations

Rights and permissions

Reprints and permissions

Copyright information

© 2005 Springer-Verlag Berlin Heidelberg

About this paper

Cite this paper

Harrison, W.L. (2005). A Simple Semantics for Polymorphic Recursion. In: Yi, K. (eds) Programming Languages and Systems. APLAS 2005. Lecture Notes in Computer Science, vol 3780. Springer, Berlin, Heidelberg. https://doi.org/10.1007/11575467_4

Download citation

  • DOI: https://doi.org/10.1007/11575467_4

  • Publisher Name: Springer, Berlin, Heidelberg

  • Print ISBN: 978-3-540-29735-2

  • Online ISBN: 978-3-540-32247-4

  • eBook Packages: Computer ScienceComputer Science (R0)

Publish with us

Policies and ethics