Skip to main content

Efficient Type Inference Using Monads (Summary)

  • Conference paper
Functional Programming, Glasgow 1991

Part of the book series: Workshops in Computing ((WORKSHOPS COMP.))

  • 69 Accesses

Abstract

Efficient type inference algorithms are based on graph-rewriting techniques. Consequently, at first sight they seem unsuitable for functional language implementation. In fact, most compilers written in functional languages use substitution-based algorithms, at a considerable cost in performance. In this paper, we show how monads may be used to transform a substitution-based inference algorithm into one using a graph representation. The resulting algorithm is faster than the corresponding substitution-based algorithm.

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. Aho A, Sethi R, Ullman J. Compilers: Principles, Techniques, and Tools, Addison Wesley, 1986.

    Google Scholar 

  2. Damas L, Milner R. “Principal type schemes for functional programs”, Proc. 9th ACM POPL, Albuquerque, NM, 1982, pp 207–212.

    Google Scholar 

  3. Hammond K, Parallel SML: A Functional Language and its Implementation in Dactl, Pitman Research Monographs in Parallel and Distributed Computing, Pitman Press, 1991.

    Google Scholar 

  4. Henglein F. “Type Inference with Polymorphic Recursion”, To appear in ACM TOPLAS, 1992.

    Google Scholar 

  5. Hudak P, Bloss A. “The Aggregate Update Problem in Functional Programming Systems”, Proc. 12th. ACM POPL, 1985, pp 300–314.

    Google Scholar 

  6. Hudak P, Wadler PL (Eds.). “Report on the Programming Language Haskell, Version 1.0”, Technical Report of the Universities of Glasgow and Yale, 1990.

    Google Scholar 

  7. Kfoury AJ, Tiuryn J, Urzyczyn P. “ML Typability is DEXPTIME-Complete”, Proc. CAAP 90, Springer Verlag LN, 1990, pp 206–220.

    Google Scholar 

  8. Mairson HG. “Deciding ML Typability is Complete for Deterministic Exponential Time”, Proc. 17th. ACM POPL, 1990, pp 382–401.

    Google Scholar 

  9. Martelli A, Montanari U. “An Efficient Unification Algorithm”, TOPLAS, 4 (2): 258–282, April 1982.

    Article  MATH  Google Scholar 

  10. Milner RJ. “A Theory of Type Polymorphism in Programming”, J Comp Sys Sci, 17: 348–75, 1978.

    Article  MATH  MathSciNet  Google Scholar 

  11. Moggi E. “Computational Lambda-Calculus and Monads”. In Symp. Logic in Comp. Sci., 1989.

    Google Scholar 

  12. Moggi E. “The Mathematical Structure of Programming Languages”, unpublished report, University di Genova, May 1991.

    Google Scholar 

  13. Paterson M. Wegman M. “Linear Unification”, J. Comp. Sys. Sci., 16: 158–167, 1978.

    Article  MATH  MathSciNet  Google Scholar 

  14. Wadler PL. “Comprehending Monads”, In Proc. Lisp & FP 90, Nice, 1990.

    Google Scholar 

  15. Wadler PL, “The Essence of Functional Programming”, Proc. 18th. ACM POPL, 1992.

    Google Scholar 

Download references

Author information

Authors and Affiliations

Authors

Editor information

Editors and Affiliations

Rights and permissions

Reprints and permissions

Copyright information

© 1992 British Computer Society

About this paper

Cite this paper

Hammond, K. (1992). Efficient Type Inference Using Monads (Summary). In: Heldal, R., Holst, C.K., Wadler, P. (eds) Functional Programming, Glasgow 1991. Workshops in Computing. Springer, London. https://doi.org/10.1007/978-1-4471-3196-0_12

Download citation

  • DOI: https://doi.org/10.1007/978-1-4471-3196-0_12

  • Publisher Name: Springer, London

  • Print ISBN: 978-3-540-19760-7

  • Online ISBN: 978-1-4471-3196-0

  • eBook Packages: Springer Book Archive

Publish with us

Policies and ethics