skip to main content
research-article

The gentle art of levitation

Published:27 September 2010Publication History
Skip Abstract Section

Abstract

We present a closed dependent type theory whose inductive types are given not by a scheme for generative declarations, but by encoding in a universe. Each inductive datatype arises by interpreting its description - a first-class value in a datatype of descriptions. Moreover, the latter itself has a description. Datatype-generic programming thus becomes ordinary programming. We show some of the resulting generic operations and deploy them in particular, useful ways on the datatype of datatype descriptions itself. Simulations in existing systems suggest that this apparently self-supporting setup is achievable without paradox or infinite regress.

Skip Supplemental Material Section

Supplemental Material

icfp-mon-1030-dagand.mov

References

  1. }}A. Abel, T. Coquand, and M. Pagano. A modular type-checking algorithm for type theory with singleton types and proof irrelevance. In TLCA. Google ScholarGoogle ScholarDigital LibraryDigital Library
  2. }}R. Adams. Pure type systems with judgemental equality. JFP, 2006. Google ScholarGoogle ScholarDigital LibraryDigital Library
  3. }}T. Altenkirch and C. McBride. Generic programming within dependently typed programming. In Generic Programming, 2002. Google ScholarGoogle ScholarDigital LibraryDigital Library
  4. }}T. Altenkirch and B. Reus. Monadic presentations of lambda terms using generalized inductive types. In Computer Science Logic. 1999. Google ScholarGoogle ScholarDigital LibraryDigital Library
  5. }}T. Altenkirch, C. McBride, and W. Swierstra. Observational equality, now! In PLPV, 2007. Google ScholarGoogle ScholarDigital LibraryDigital Library
  6. }}L. Augustsson and M. Carlsson. An exercise in dependent types: A well-typed interpreter. Available at http://www.cs.chalmers.se/~augustss/cayenne/interp.ps, 1999.Google ScholarGoogle Scholar
  7. }}M. Benke, P. Dybjer, and P. Jansson. Universes for generic programs and proofs in dependent type theory. Nordic Journal of Computing, 2003. Google ScholarGoogle ScholarDigital LibraryDigital Library
  8. }}E. Brady, J. Chapman, P.-E. Dagand, A. Gundry, C. McBride, P. Morris, and U. Norell. An Epigram implementation.Google ScholarGoogle Scholar
  9. }}E. Brady, C. McBride, and J. McKinna. Inductive families need not store their indices. In TYPES, 2003.Google ScholarGoogle Scholar
  10. }}J. Cheney and R. Hinze. First-class phantom types. Technical report, Cornell University, 2003.Google ScholarGoogle Scholar
  11. }}T. Coquand. An algorithm for type-checking dependent types. SCP, 1996. Google ScholarGoogle ScholarDigital LibraryDigital Library
  12. }}J. Courant. Explicit universes for the calculus of constructions. In TPHOLs, 2002. Google ScholarGoogle ScholarDigital LibraryDigital Library
  13. }}N. A. Danielsson. The Agda standard library, 2010.Google ScholarGoogle Scholar
  14. }}P. Dybjer. Inductive sets and families in Martin-Löf's type theory. In Logical Frameworks. 1991. Google ScholarGoogle ScholarDigital LibraryDigital Library
  15. }}P. Dybjer and A. Setzer. A finite axiomatization of inductive-recursive definitions. In TLCA, 1999. Google ScholarGoogle ScholarDigital LibraryDigital Library
  16. }}P. Dybjer and A. Setzer. Induction-recursion and initial algebras. In Annals of Pure and Applied Logic, 2000.Google ScholarGoogle Scholar
  17. }}P. Dybjer and A. Setzer. Indexed induction-recursion. In Proof Theory in Computer Science. 2001. Google ScholarGoogle ScholarDigital LibraryDigital Library
  18. }}R. Garcia, J. Jarvi, A. Lumsdaine, J. Siek, and J. Willcock. A comparative study of language support for generic programming. In OOPSLA, 2003. Google ScholarGoogle ScholarDigital LibraryDigital Library
  19. }}H. Geuvers. Induction is not derivable in second order dependent type theory. In TLCA, 2001. Google ScholarGoogle ScholarDigital LibraryDigital Library
  20. }}H. Goguen, C. McBride, and J. McKinna. Eliminating dependent pattern matching. In Algebra, Meaning and Computation. 2006.Google ScholarGoogle Scholar
  21. }}R. Harper and R. Pollack. Type checking with universes. In TAPSOFT'89. Google ScholarGoogle ScholarDigital LibraryDigital Library
  22. }}R. Hinze. Polytypic values possess polykinded types. In MPC. 2000. Google ScholarGoogle ScholarDigital LibraryDigital Library
  23. }}R. Hinze, J. Jeuring, and A. Löh. Type-indexed data types. In MPC, 2002. Google ScholarGoogle ScholarDigital LibraryDigital Library
  24. }}R. Hinze, J. Jeuring, and A. Löh. Comparing approaches to generic programming in Haskell. In Datatype-Generic Programming. 2007. Google ScholarGoogle ScholarDigital LibraryDigital Library
  25. }}S. Holdermans, J. Jeuring, A. Löh, and A. Rodriguez. Generic views on data types. In MPC. 2006. Google ScholarGoogle ScholarDigital LibraryDigital Library
  26. }}P. Jansson and J. Jeuring. PolyP - a polytypic programming language extension. In POPL, 1997. Google ScholarGoogle ScholarDigital LibraryDigital Library
  27. }}R. Lämmel and S. Peyton Jones. Scrap your boilerplate: a practical design pattern for generic programming. In TLDI, 2003.Google ScholarGoogle ScholarDigital LibraryDigital Library
  28. }}D. R. Licata and R. Harper. A universe of binding and computation. In ICFP, 2009. Google ScholarGoogle ScholarDigital LibraryDigital Library
  29. }}Z. Luo. Computation and Reasoning. Oxford University Press, 1994. Google ScholarGoogle ScholarDigital LibraryDigital Library
  30. }}P. Martin-Löf. Intuitionistic Type Theory. Bibliopolis•Napoli, 1984.Google ScholarGoogle Scholar
  31. }}C. McBride and J. McKinna. The view from the left JFP, 2004. Google ScholarGoogle ScholarDigital LibraryDigital Library
  32. }}P. Morris. Constructing Universes for Generic Programming. PhD thesis, University of Nottingham, 2007.Google ScholarGoogle Scholar
  33. }}P. Morris and T. Altenkirch. Indexed containers. In LICS, 2009. Google ScholarGoogle ScholarDigital LibraryDigital Library
  34. }}P. Morris, T. Altenkirch, and C. McBride. Exploring the regular tree types. In TYPES, 2004. Google ScholarGoogle ScholarDigital LibraryDigital Library
  35. }}P. Morris, T. Altenkirch, and N. Ghani. A universe of strictly positive families. IJCS, 2009.Google ScholarGoogle ScholarCross RefCross Ref
  36. }}U. Norell. Functional generic programming and type theory. Master’s thesis, Chalmers University of Technology, 2002.Google ScholarGoogle Scholar
  37. }}U. Norell. Towards a practical programming language based on dependent type theory. PhD thesis, Chalmers University of Technology, 2007.Google ScholarGoogle Scholar
  38. }}N. Oury and W. Swierstra. The power of Pi. In ICFP, 2008. Google ScholarGoogle ScholarDigital LibraryDigital Library
  39. }}C. Paulin-Mohring. Définitions inductives en théorie des types d’ordre supérieur. thèse d’habilitation, ENS Lyon, 1996.Google ScholarGoogle Scholar
  40. }}B. C. Pierce and D. N. Turner. Local type inference. In POPL, 1998. Google ScholarGoogle ScholarDigital LibraryDigital Library
  41. }}A. Rodriguez, J. Jeuring, P. Jansson, A. Gerdes, O. Kiselyov, and B. C. d. S. Oliveira. Comparing libraries for generic programming in Haskell. In Haskell Symposium, 2008. Google ScholarGoogle ScholarDigital LibraryDigital Library
  42. }}The Coq Development Team. The Coq Proof Assistant Reference Manual.Google ScholarGoogle Scholar
  43. }}W. Verbruggen, E. de Vries, and A. Hughes. Polytypic programming in Coq. In WGP, 2008. Google ScholarGoogle ScholarDigital LibraryDigital Library
  44. }}W. Verbruggen, E. de Vries, and A. Hughes. Polytypic properties and proofs in Coq. In WGP, 2009. Google ScholarGoogle ScholarDigital LibraryDigital Library
  45. }}S. Weirich and C. Casinghino. Arity-generic datatype-generic programming. In PLPV, 2010. Google ScholarGoogle ScholarDigital LibraryDigital Library
  46. }}H. Xi, C. Chen, and G. Chen. Guarded recursive datatype constructors. In POPL, 2003. Google ScholarGoogle ScholarDigital LibraryDigital Library
  47. }}A. R. Yakushev, S. Holdermans, A. Löh, and J. Jeuring. Generic programming with fixed points for mutually recursive datatypes. In ICFP, 2009. Google ScholarGoogle ScholarDigital LibraryDigital Library

Index Terms

  1. The gentle art of levitation

      Recommendations

      Comments

      Login options

      Check if you have access through your login credentials or your institution to get full access on this article.

      Sign in

      Full Access

      • Published in

        cover image ACM SIGPLAN Notices
        ACM SIGPLAN Notices  Volume 45, Issue 9
        ICFP '10
        September 2010
        382 pages
        ISSN:0362-1340
        EISSN:1558-1160
        DOI:10.1145/1932681
        Issue’s Table of Contents
        • cover image ACM Conferences
          ICFP '10: Proceedings of the 15th ACM SIGPLAN international conference on Functional programming
          September 2010
          398 pages
          ISBN:9781605587943
          DOI:10.1145/1863543

        Copyright © 2010 ACM

        Publisher

        Association for Computing Machinery

        New York, NY, United States

        Publication History

        • Published: 27 September 2010

        Check for updates

        Qualifiers

        • research-article

      PDF Format

      View or Download as a PDF file.

      PDF

      eReader

      View online with eReader.

      eReader

      ePub

      View this article in ePub.

      View ePub
      About Cookies On This Site

      We use cookies to ensure that we give you the best experience on our website.

      Learn more

      Got it!