skip to main content
research-article

Language and program design for functional dependencies

Published:25 September 2008Publication History
Skip Abstract Section

Abstract

Eight years ago, functional dependencies, a concept from the theory of relational databases, were proposed as a mechanism for avoiding common problems with multiple parameter type classes in Haskell. In this context, functional dependencies give programmers a means to specify the semantics of a type class more precisely, and to obtain more accurate inferred types as a result. As time passed, however, several issues were uncovered - both in the design of a language to support functional dependencies, and in the ways that programmers use them - that led some to search for new, better alternatives.

This paper focusses on two related aspects of design for functional dependencies: (i) the design of language/type system extensions that implement them; and (ii) the design of programs that use them. Our goal is to clarify the issues of what functional dependencies are, how they should be used, and how the problems encountered with initial proposals and implementations can be addressed.

Skip Supplemental Material Section

Supplemental Material

Video

References

  1. William Ward Armstrong. Dependency structures of data base relationships. In IFIP Congress, pages 580--583, 1974.Google ScholarGoogle Scholar
  2. Paolo Atzeni and Valeria De Antonellis. Relational Database Theory. Benjamin/Cummings, 1993. ISBN 0-8053-0249-2. Google ScholarGoogle ScholarDigital LibraryDigital Library
  3. Stephen Blott. An Approach to Overloading with Polymorphism. PhD thesis, Department of Computing, University of Glasgow, December 1992.Google ScholarGoogle Scholar
  4. Manuel M. T. Chakravarty, Gabriele Keller, Simon L. Peyton Jones, and Simon Marlow. Associated types with class. In Proceedings of the 32nd ACM SIGPLAN-SIGACT Symposium on Principles of Programming Languages (POPL 2005), pages 1--13, Long Beach, California, USA, January 2005. Google ScholarGoogle ScholarDigital LibraryDigital Library
  5. Kung Chen, Paul Hudak, and Martin Odersky. Parametric type classes. In ACM Conference on LISP and Functional Programming, pages 170--181, 1992. Google ScholarGoogle ScholarDigital LibraryDigital Library
  6. E. F. Codd. A relational model of data for large shared data banks. Communications of the ACM, 13 (6): 377--387, 1970. Google ScholarGoogle ScholarDigital LibraryDigital Library
  7. E. F. Codd. Normalized data base structure: A brief tutorial. IBM Research Report, San Jose, California, RJ935, 1971.Google ScholarGoogle Scholar
  8. E. F. Codd. Further normalization of the data base relational model. IBM Research Report, San Jose, California, RJ909, 1971.Google ScholarGoogle Scholar
  9. L. Damas and R. Milner. Principal type schemes for functional programs. In 9th Annual ACM Symposium on Principles of Programming languages, pages 207--212, Albuquerque, NM, January 1982. Google ScholarGoogle ScholarDigital LibraryDigital Library
  10. Iavor S. Diatchki. High-level Abstractions for Low-level Programming. PhD thesis, OGI School of Science & Engineering at Oregon Health & Science University, May 2007.Google ScholarGoogle Scholar
  11. Iavor S. Diatchki and Mark P. Jones. Strongly typed memory areas. In Proceedings of ACM SIGPLAN 2006 Haskell Workshop, pages 72--83, Portland, Oregon, September 2006. Google ScholarGoogle ScholarDigital LibraryDigital Library
  12. Iavor S. Diatchki, Mark P. Jones, and Rebekah Leslie. High-level views on low-level representations. In ICFP 2005: ACM SIGPLAN International Conference on Functional Programming, 2005. Google ScholarGoogle ScholarDigital LibraryDigital Library
  13. Thomas Hallgren. Fun with functional dependencies, or (draft) types as values in static computations in Haskell. In Proceedings of the Joint CS/CE Winter Meeting, Varberg, Sweden, January 2001.Google ScholarGoogle Scholar
  14. Paul Hudak, John Hughes, Simon L. Peyton Jones, and Philip Wadler. A history of Haskell: being lazy with class. In Proceedings of the Third ACM SIGPLAN History of Programming Languages Conference (HOPL-III), San Diego, California, USA, June 2007. Google ScholarGoogle ScholarDigital LibraryDigital Library
  15. Mark P. Jones. Qualified Types: Theory and Practice. PhD thesis, Programming Research Group, Oxford University Computing Laboratory, July 1992. Published by Cambridge University Press, November 1994. Google ScholarGoogle ScholarDigital LibraryDigital Library
  16. Mark P. Jones. Simplifying and improving qualified types. In International Conference on Functional Programming Languages and Computer Architecture, pages 160--169, June 1995. Google ScholarGoogle ScholarDigital LibraryDigital Library
  17. Mark P. Jones. Simplifying and improving qualified types. Research Report YALEU/DCS/RR-1040, Yale University, New Haven, Connecticut, USA, June 1994.Google ScholarGoogle ScholarCross RefCross Ref
  18. Mark P. Jones. Type classes with functional dependencies. In ESOP 2000: European Symposium on Programming, March 2000. Google ScholarGoogle ScholarDigital LibraryDigital Library
  19. Mark P. Jones. The implementation of the Gofer functional programming system. Research Report YALEU/DCS/RR-1030, Yale University, New Haven, Connecticut, USA, May 1994.Google ScholarGoogle Scholar
  20. Mark P. Jones. Functional programming with overloading and higher-order polymorphism. In First International Spring School on Advanced Functional Programming Techniques, volume 925. Springer-Verlag LNCS, Båstad, Sweden, May 1995. Google ScholarGoogle ScholarDigital LibraryDigital Library
  21. Simon Peyton Jones. Indexed type families in Haskell, and death to functional dependencies (slides). In AngloHaskell 2007, Cambridge, England, August 2007. Available online at http://haskell.org/haskellwiki/AngloHaskell/2007.Google ScholarGoogle Scholar
  22. Simon Peyton Jones, editor. Haskell 98 Language and Libraries, The Revised Report. Cambridge University Press, 2003.Google ScholarGoogle Scholar
  23. Sheng Liang, Paul Hudak, and Mark Jones. Monad transformers and modular interpreters. In POPL '95: Proceedings of the 22nd ACM SIGPLAN-SIGACT symposium on Principles of programming languages, pages 333--343. ACM, 1995. Google ScholarGoogle ScholarDigital LibraryDigital Library
  24. David Maier. The Theory of Relational Databases. Computer Science Press, 1983. ISBN 0-914894-42-0. Google ScholarGoogle ScholarDigital LibraryDigital Library
  25. Matthias Neubauer, Peter Thiemann, Martin Gasbichler, and Michael Sperber. A functional notation for functional dependencies. In Proceedings of The 2001 ACM SIGPLAN Haskell Workshop, Firenze, Italy, September 2001.Google ScholarGoogle Scholar
  26. Tom Schrijvers, Simon Peyton Jones, Manuel Chakravarty, and Martin Sulzmann. Type checking with open type functions. In Proceedings of the 13th ACM SIGPLAN International Conference on Functional Programming (ICFP 2008), Victoria, British Columbia, Canada, September 2008. Google ScholarGoogle ScholarDigital LibraryDigital Library
  27. Martin Sulzmann, Gregory J. Duck, Simon Peyton Jones, and Peter J. Stuckey. Understanding functional dependencies via constraint handling rules. Journal of Functional Programming, 17: 83--129, 2007. Google ScholarGoogle ScholarDigital LibraryDigital Library
  28. Philip Wadler and Stephen Blott. How to make ad-hoc polymorphism less ad-hoc. In Proceedings of the 16th ACM Symposium on Principles of Programming Languages (POPL 1989), pages 60--76, Austin, Texas, USA, January 1989. Google ScholarGoogle ScholarDigital LibraryDigital Library

Index Terms

  1. Language and program design for functional dependencies

      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

      PDF Format

      View or Download as a PDF file.

      PDF

      eReader

      View online with eReader.

      eReader
      About Cookies On This Site

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

      Learn more

      Got it!