Skip to main content

Generic Programming with Dependent Types

  • Conference paper
Datatype-Generic Programming (SSDGP 2006)

Part of the book series: Lecture Notes in Computer Science ((LNTCS,volume 4719))

Included in the following conference series:

  • 515 Accesses

Abstract

In these lecture notes we give an overview of recent research on the relationship and interaction between two novel ideas in (functional) programming:

Generic programming. Generic programming [15,22] allows programmers to explain how a single algorithm can be instantiated for a variety of datatypes, by computation over each datatype’s structure.

Dependent types. Dependent types [29,38] are types containing data which enable the programmer to express properties of data concisely, covering the whole spectrum from conventional uses of types to types-as-specifications and programs-as-proofs.

This is a preview of subscription content, log in via an institution to check access.

Access this chapter

Institutional subscriptions

Preview

Unable to display preview. Download preview PDF.

Unable to display preview. Download preview PDF.

Similar content being viewed by others

References

  1. Abbott, M.: Categories of Containers. PhD thesis, University of Leicester (2003)

    Google Scholar 

  2. Abbott, M., Altenkirch, T., Ghani, N.: Categories of containers. In: Proceedings of Foundations of Software Science and Computation Structures (2003)

    Google Scholar 

  3. Abbott, M., Altenkirch, T., Ghani, N.: Representing nested inductive types using W-types. In: Díaz, J., Karhumäki, J., Lepistö, A., Sannella, D. (eds.) ICALP 2004. LNCS, vol. 3142, pp. 59–71. Springer, Heidelberg (2004)

    Chapter  Google Scholar 

  4. Abbott, M., Altenkirch, T., Ghani, N.: Containers - constructing strictly positive types. Theoretical Computer Science 342, 3–27 (2005) (Applied Semantics: Selected Topics)

    Article  MathSciNet  MATH  Google Scholar 

  5. Abbott, M., Altenkirch, T., Ghani, N., McBride, C.: Derivatives of containers. In: Hofmann, M.O. (ed.) TLCA 2003. LNCS, vol. 2701, Springer, Heidelberg (2003)

    Chapter  Google Scholar 

  6. Abbott, M., Altenkirch, T., Ghani, N., McBride, C.: Constructing polymorphic programs with quotient types. In: Kozen, D. (ed.) MPC 2004. LNCS, vol. 3125, Springer, Heidelberg (2004)

    Chapter  Google Scholar 

  7. Abbott, M., Altenkirch, T., Ghani, N., McBride, C.: \(\partial\) for data. Fundamentae Informatica 65(1,2), 1–28 (2005) (Special Issue on Typed Lambda Calculi and Applications 2003)

    MATH  Google Scholar 

  8. Altenkirch, T., Ghani, N., Hancock, P., McBride, C., Morris, P.: Indexed containers. Manuscript, available online (February 2006)

    Google Scholar 

  9. Altenkirch, T., McBride, C.: Generic programming within dependently typed programming. In: Generic Programming, 2003. Proceedings of the IFIP TC2 Working Conference on Generic Programming, Schloss Dagstuhl (July 2002)

    Google Scholar 

  10. Altenkirch, T., McBride, C.: Towards observational type theory. Manuscript, available online (February 2006)

    Google Scholar 

  11. Altenkirch, T., McBride, C., McKinna, J.: Why dependent types matter. Manuscript, available online (April 2005)

    Google Scholar 

  12. Altenkirch, T., McBride, C., Morris, P.: Code for generic programming with dependent types (2007), http://www.e-pig.org /downloads/GPwDT

  13. Altenkirch, T., Uustalu, T.: Normalization by evaluation for λ →2. In: Kameyama, Y., Stuckey, P.J. (eds.) FLOPS 2004. LNCS, vol. 2998, pp. 260–275. Springer, Heidelberg (2004)

    Chapter  Google Scholar 

  14. Loeh, A., Jeuring, J., (ed.) Clarke, D., Hinze, R., Rodriguez, A., de Wit, J.: Generic Haskell User’s Guide - Version 1.42 (Coral). Technical Report UU-CS-2005-004, Institute of Information and Computing Sciences, Utrecht University (2005)

    Google Scholar 

  15. Backhouse, R., Jansson, P., Jeuring, J., Meertens, L.: Generic Programming—An Introduction. In: Swierstra, S.D., Oliveira, J.N. (eds.) AFP 1998. LNCS, vol. 1608, pp. 28–115. Springer, Heidelberg (1999)

    Chapter  Google Scholar 

  16. Benke, M., Dybjer, P., Jansson, P.: Universes for generic programs and proofs in dependent type theory. Nordic Journal of Computing 10(4), 265–289 (2003)

    MathSciNet  MATH  Google Scholar 

  17. Bird, R., de Moor, O.: Algebra of Programming. Prentice Hall, Englewood Cliffs (1997)

    MATH  Google Scholar 

  18. Crary, K., Weirich, S., Morrisett, G.: Intensional polymorphism in type erasure semantics. Journal of Functional Programming 12(6), 567–600 (2002)

    Article  MathSciNet  MATH  Google Scholar 

  19. Dybjer, P.: Inductive Sets and Families in Martin-Löf’s Type Theory. In: Huet, G., Plotkin, G. (eds.) Logical Frameworks. CUP (1991)

    Google Scholar 

  20. Dybjer, P., Setzer, A.: A finite axiomatization of inductive-recursive definitions. Typed Lambda Calculi and Applications 1581, 129–146 (1999)

    Article  MathSciNet  MATH  Google Scholar 

  21. Dybjer, P., Setzer, A.: Indexed induction-recursion. Journal of Logic and Algebraic Programming 66(1), 1–49 (2006)

    Article  MathSciNet  MATH  Google Scholar 

  22. Hinze, R.: Generic programs and proofs. Habilitationsschrift, Universität Bonn (2000)

    Google Scholar 

  23. Hinze, R., Löh, A.: Scrap Your Boilerplate Revolutions. In: Uustalu, T. (ed.) MPC 2006. LNCS, vol. 4014, pp. 180–208. Springer, Heidelberg (2006)

    Chapter  Google Scholar 

  24. Hinze, R., Löh, A., Oliveira, B.C.D.S.: Scrap Your Boilerplate Reloaded. In: Hagiya, M., Wadler, P. (eds.) FLOPS 2006. LNCS, vol. 3945, pp. 13–29. Springer, Heidelberg (2006)

    Chapter  Google Scholar 

  25. Huet, G.: The Zipper. Journal of Functional Programming 7(5), 549–554 (1997)

    Article  MathSciNet  MATH  Google Scholar 

  26. Löh, A.: Exploring Generic Haskell. PhD thesis, Utrecht University, Netherlands (September 2004)

    Google Scholar 

  27. Luo, Z., Pollack, R.: LEGO Proof Development System: User’s Manual. Technical Report ECS-LFCS-92-211, Laboratory for Foundations of Computer Science, University of Edinburgh (1992)

    Google Scholar 

  28. Magnusson, L., Nordström, B.: The ALF proof editor and its proof engine. In: Barendregt, H., Nipkow, T. (eds.) TYPES 1993. LNCS, vol. 806, Springer, Heidelberg (1994)

    Chapter  Google Scholar 

  29. Martin-Löf, P.: Intuitionistic Type Theory. Bibliopolis Napoli (1984)

    Google Scholar 

  30. McBride, C.: The Derivative of a Regular Type is its Type of One-Hole Contexts. Available online (2001)

    Google Scholar 

  31. McBride, C.: Epigram (2004), http://www.e-pig.org/

  32. McBride, C.: Epigram: Practical programming with dependent types. In: Vene, V., Uustalu, T. (eds.) AFP 2004. LNCS, vol. 3622, Springer, Heidelberg (2005)

    Chapter  Google Scholar 

  33. McBride, C., McKinna, J.: The view from the left. Journal of Functional Programming 14(1) (2004)

    Google Scholar 

  34. McBride, F.: Computer Aided Manipulation of Symbols. PhD thesis, Queen’s University of Belfast (1970)

    Google Scholar 

  35. Morris, P., Altenkirch, T., Ghani, N.: Constructing strictly positive families. In: The Australasian Theory Symposium (CATS2007) (2007)

    Google Scholar 

  36. Morris, P., Altenkirch, T., McBride, C.: Exploring the regular tree types. In: Filliâtre, J.-C., Paulin-Mohring, C., Werner, B. (eds.) TYPES 2004. LNCS, vol. 3839, Springer, Heidelberg (2006)

    Chapter  Google Scholar 

  37. Pfeifer, H., Rueß, H.: Polytypic abstraction in type theory. In: Backhouse, R., Sheard, T. (eds.) Workshop on Generic Programming (WGP 1998). Dept. of Computing Science, Chalmers Univ. of Techn. and Göteborg Univ., (June 1998)

    Google Scholar 

  38. Nordström, B., Petersson, K., Smith, J.: Programming in Martin-Löf’s type theory: an introduction. Oxford University Press, Oxford (1990)

    MATH  Google Scholar 

  39. Vytiniotis, D., Weirich, S., Jones, S.: Boxy type inference for higher-rank types and impredicativity. In: Proceedings of the International Conference on Functional Programming (ICFP 2006) (2006)

    Google Scholar 

  40. Wadler, P.: Views: A way for pattern matching to cohabit with data abstraction. In: Proceedings of POPL 1987, ACM, New York (1987)

    Google Scholar 

  41. Weirich, S.: RepLib: A library for derivable type classes. In: Löh, A. (ed.) Proceedings of the ACM Haskell Workshop, 2006 (2006)

    Google Scholar 

Download references

Author information

Authors and Affiliations

Authors

Editor information

Roland Backhouse Jeremy Gibbons Ralf Hinze Johan Jeuring

Rights and permissions

Reprints and permissions

Copyright information

© 2007 Springer-Verlag Berlin Heidelberg

About this paper

Cite this paper

Altenkirch, T., McBride, C., Morris, P. (2007). Generic Programming with Dependent Types. In: Backhouse, R., Gibbons, J., Hinze, R., Jeuring, J. (eds) Datatype-Generic Programming. SSDGP 2006. Lecture Notes in Computer Science, vol 4719. Springer, Berlin, Heidelberg. https://doi.org/10.1007/978-3-540-76786-2_4

Download citation

  • DOI: https://doi.org/10.1007/978-3-540-76786-2_4

  • Publisher Name: Springer, Berlin, Heidelberg

  • Print ISBN: 978-3-540-76785-5

  • Online ISBN: 978-3-540-76786-2

  • eBook Packages: Computer ScienceComputer Science (R0)

Publish with us

Policies and ethics