Skip to main content

Chapter 1. Generic Haskell: Practice and Theory

  • Chapter
Generic Programming

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

Abstract

Generic Haskell is an extension of Haskell that supports the construction of generic programs. These lecture notes describe the basic constructs of Generic Haskell and highlight the underlying theory.

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 49.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. Alimarine, A., Plasmeijer, R.: A generic programming extension for Clean. In: Arts, T., Mohnen, M. (eds.) Proceedings of the 13th International workshop on the Implementation of Functional Languages, IFL 2001, lvsj, Sweden, September 2001, pp. 257–278 (2001)

    Google Scholar 

  2. Altenkirch, T., McBride, C.: Generic programming within dependently typed programming. In: Gibbons, J., Jeuring, J. (eds.) Pre-Proceedings of IFIP TC2 Working Conf. on Generic Programming, WCGP 2002, Dagstuhl, July 11–12 (2002) (Final Proceedings to be published by Kluwer Acad. Publ.)

    Google Scholar 

  3. Augustsson, L.: The Haskell B. Compiler, HBC (1998), Available from http://www.cs.chalmers.se/~augustss/hbc/hbc.html

  4. Augustsson, L.: Cayenne – a language with dependent types. SIGPLAN Notices 34(1), 239–250 (1999)

    Article  Google Scholar 

  5. Baars, A.I., Swierstra, S.D.: Typing dynamic typing. In: Jones, S.P. (ed.) Proceedings of the 2002 International Conference on Functional Programming, Pittsburgh, PA, USA, October 4-6, pp. 157–166. ACM Press, New York (2002)

    Google Scholar 

  6. Bird, R.: Introduction to Functional Programming using Haskell, 2nd edn. Prentice Hall Europe, London (1998)

    Google Scholar 

  7. Bird, R., Meertens, L.: Nested datatypes. In: Jeuring, J. (ed.) MPC 1998. LNCS (LNAI), vol. 1422, pp. 52–67. Springer, Heidelberg (1998)

    Chapter  Google Scholar 

  8. Bird, R., Paterson, R.: Generalised folds for nested datatypes. Formal Aspects of Computing 11(2), 200–222 (1999)

    Article  MATH  Google Scholar 

  9. Cheney, J., Hinze, R.: A lightweight implementation of generics and dynamics. In: Chakravarty, M.M.T. (ed.) Proceedings of the 2002 ACM SIGPLAN Haskell Workshop, pp. 90–104. ACM Press, New York (2002)

    Chapter  Google Scholar 

  10. Cockett, R., Fukushima, T.: About Charity. Yellow Series Report 92/480/18, Dept. of Computer Science, Univ. of Calgary (June 1992)

    Google Scholar 

  11. Danvy, O.: An extensional characterization of lambda-lifting and lambda-dropping. In: Middeldorp, A., Sato, T. (eds.) FLOPS 1999. LNCS (LNAI), vol. 1722, pp. 241–250. Springer, Heidelberg (1999)

    Chapter  Google Scholar 

  12. Gapeyev, V., Levin, M.Y., Pierce, B.C.: Recursive subtyping revealed (functional pearl). In: Proceedings of the ACM Sigplan International Conference on Functional Programming (ICFP 2000), New York. ACM Sigplan Notices, vol. 35, pp. 221–232. ACM Press, New York (2000)

    Chapter  Google Scholar 

  13. Gierz, G., Hofmann, K.H., Keimel, K., Lawson, J.D., Mislove, M., Scott, D.S.: A Compendium of Continuous Lattices. Springer, Heidelberg (1980)

    MATH  Google Scholar 

  14. Girard, J.-Y.: Interprétation fonctionelle et élimination des coupures dans l’arithmétique d’ordre supérieur. PhD thesis, Université Paris VII (1972)

    Google Scholar 

  15. Hagino, T.: Category Theoretic Approach to Data Types. PhD thesis, University of Edinburgh (1987)

    Google Scholar 

  16. Harper, R., Morrisett, G.: Compiling polymorphism using intensional type analysis. In: Conference record of the 22nd ACM SIGPLAN-SIGACT Symposium on Principles of Programming Languages (POPL 1995), San Francisco, California, pp. 130–141. ACM Press, New York (1995)

    Chapter  Google Scholar 

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

    Article  Google Scholar 

  18. Hinze, R.: A generic programming extension for Haskell. In: Meijer, E. (ed.) Proceedings of the 3rd Haskell Workshop, Paris, France (September 1999); The proceedings appeared as a technical report of Universiteit Utrecht, UU-CS-1999-28

    Google Scholar 

  19. Hinze, R.: Polytypic programming with ease (extended abstract). In: Middeldorp, A., Sato, T. (eds.) FLOPS 1999. LNCS (LNAI), vol. 1722, pp. 21–36. Springer, Heidelberg (1999)

    Chapter  Google Scholar 

  20. Hinze, R.: Functional Pearl: Perfect trees and bit-reversal permutations. Journal of Functional Programming 10(3), 305–317 (2000)

    Article  MATH  MathSciNet  Google Scholar 

  21. Hinze, R.: A new approach to generic functional programming. In: Reps, T.W. (ed.) Proceedings of the 27th Annual ACM SIGPLAN-SIGACT Symposium on Principles of Programming Languages (POPL 2000), Boston, Massachusetts, January 19-21, pp. 119–132 (2000)

    Google Scholar 

  22. Hinze, R.: Polytypic values possess polykinded types. Science of Computer Programmming 43, 129–159 (2002)

    Article  MATH  MathSciNet  Google Scholar 

  23. Hinze, R., Jones, S.P.: Derivable type classes. In: Hutton, G. (ed.) Proceedings of the 2000 ACM SIGPLAN Haskell Workshop, August 2001. Electronic Notes in Theoretical Computer Science, vol. 41.1. Elsevier Science, Amsterdam (2001); The preliminary proceedings appeared as a University of Nottingham technical report

    Google Scholar 

  24. Jansson, P., Jeuring, J.: PolyP—a polytypic programming language extension. In: Conference Record 24th ACM SIGPLAN-SIGACT Symposium on Principles of Programming Languages (POPL’97), Paris, France, pp. 470–482. ACM Press, New York (1997)

    Chapter  Google Scholar 

  25. Jansson, P., Jeuring, J.: Polytypic compact printing and parsing. In: Swierstra, S.D. (ed.) ESOP 1999. LNCS (LNAI), vol. 1576, pp. 273–287. Springer, Heidelberg (1999)

    Chapter  Google Scholar 

  26. Jay, C.B., Bellè, G., Moggi, E.: Functorial ML. Journal of Functional Programming 8(6), 573–619 (1998)

    Article  MATH  MathSciNet  Google Scholar 

  27. Jay, C.B., Cocket, J.R.B.: Shapely types and shape polymorphism. In: Sannella, D. (ed.) ESOP 1994. LNCS (LNAI), vol. 788, pp. 302–316. Springer, Heidelberg (1994)

    Google Scholar 

  28. Jeuring, J., Jansson, P.: Polytypic programming. In: Launchbury, J., Sheard, T., Meijer, E. (eds.) AFP 1996. LNCS (LNAI), vol. 1129, pp. 68–114. Springer, Heidelberg (1996)

    Google Scholar 

  29. Jones, M.P., Peterson, J.C.: Hugs 98 User Manual (May 1999), Available from http://www.haskell.org/hugs

  30. Malcolm, G.: Algebraic data types and program transformation. PhD thesis, University of Groningen (1990)

    Google Scholar 

  31. Meertens, L.: Calculate polytypically! In: Kuchen, H., Swierstra, S.D. (eds.) PLILP 1996. LNCS (LNAI), vol. 1140, pp. 1–16. Springer, Heidelberg (1996)

    Google Scholar 

  32. Meijer, E., Hutton, G.: Bananas in space: Extending fold and unfold to exponential types. In: Conference Record 7th ACM SIGPLAN/SIGARCH and IFIP WG 2.8 International Conference on Functional Programming Languages and Computer Architecture, FPCA 1995, La Jolla, San Diego, CA, USA, pp. 324–333. ACM Press, New York (1995)

    Google Scholar 

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

    Article  MATH  MathSciNet  Google Scholar 

  34. Mitchell, J.C.: Foundations for Programming Languages. The MIT Press, Cambridge (1996)

    Google Scholar 

  35. Moggi, E.: A cateogry-theoretic account of program modules. Mathematical Structures in Computer Science 1(1), 103–139 (1991)

    Article  MATH  MathSciNet  Google Scholar 

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

    Google Scholar 

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

    Book  Google Scholar 

  38. Jones, S.P.: Haskell 98 Language and Libraries. Cambridge University Press, Cambridge (2003)

    Google Scholar 

  39. Jones, S.L.P.: Compiling Haskell by program transformation: A report from the trenches. In: Riis Nielson, H. (ed.) ESOP 1996. LNCS (LNAI), vol. 1058, pp. 18–44. Springer, Heidelberg (1996)

    Google Scholar 

  40. Pierce, B.C.: Types and programming languages. MIT Press, Cambridge (2002)

    Google Scholar 

  41. Ruehr, F.: Structural polymorphism. In: Backhouse, R., Sheard, T. (eds.) Informal Proceedings Workshop on Generic Programming, WGP 1998, Marstrand, Sweden, June 18, Dept. of Computing Science, Chalmers Univ. of Techn. and Göteborg Univ. (1998)

    Google Scholar 

  42. Ruehr, K.F.: Analytical and Structural Polymorphism Expressed using Patterns over Types. PhD thesis, University of Michigan (1992)

    Google Scholar 

  43. Sheard, T.: Automatic generation and use of abstract structure operators. ACM Transactions on Programming Languages and Systems 13(4), 531–557 (1991)

    Article  Google Scholar 

  44. Sheard, T.: Type parametric programming. Technical Report CS/E 93-018, Oregon Graduate Institute of Science and Technology, Department of Computer Science and Engineering, Portland, OR, USA (November 1993)

    Google Scholar 

  45. The GHC Team. The Glasgow Haskell Compiler User’s Guide, Version 5.04 (2003), Available from http://www.haskell.org/ghc/documentation.html

  46. Wadler, P.: Theorems for free! In: The Fourth International Conference on Functional Programming Languages and Computer Architecture (FPCA 1989), London, UK, pp. 347–359. Addison-Wesley, Reading (1989)

    Google Scholar 

  47. Wadler, P.: The Girard-Reynolds isomorphism. In: Kobayashi, N., Pierce, B.C. (eds.) TACS 2001. LNCS, vol. 2215, pp. 468–491. Springer, Heidelberg (2001)

    Chapter  Google Scholar 

  48. Wadler, P.: A prettier printer. In: Gibbons, J., de Moor, O. (eds.) The Fun of Programming, Cornerstones of Computing, pp. 223–243. Palgrave Macmillan Publishers Ltd, Basingstoke (2003)

    Google Scholar 

  49. Weirich, S.: Higher-order intensional type analysis. In: Le Métayer, D. (ed.) ESOP 2002. LNCS, vol. 2305, pp. 98–114. Springer, Heidelberg (2002)

    Chapter  Google Scholar 

Download references

Author information

Authors and Affiliations

Authors

Editor information

Editors and Affiliations

Rights and permissions

Reprints and permissions

Copyright information

© 2003 Springer-Verlag Berlin Heidelberg

About this chapter

Cite this chapter

Hinze, R., Jeuring, J. (2003). Chapter 1. Generic Haskell: Practice and Theory. In: Backhouse, R., Gibbons, J. (eds) Generic Programming. Lecture Notes in Computer Science, vol 2793. Springer, Berlin, Heidelberg. https://doi.org/10.1007/978-3-540-45191-4_1

Download citation

  • DOI: https://doi.org/10.1007/978-3-540-45191-4_1

  • Publisher Name: Springer, Berlin, Heidelberg

  • Print ISBN: 978-3-540-20194-6

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

  • eBook Packages: Springer Book Archive

Publish with us

Policies and ethics