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.
Supplemental Material
Available for Download
- William Ward Armstrong. Dependency structures of data base relationships. In IFIP Congress, pages 580--583, 1974.Google Scholar
- Paolo Atzeni and Valeria De Antonellis. Relational Database Theory. Benjamin/Cummings, 1993. ISBN 0-8053-0249-2. Google Scholar
Digital Library
- Stephen Blott. An Approach to Overloading with Polymorphism. PhD thesis, Department of Computing, University of Glasgow, December 1992.Google Scholar
- 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 Scholar
Digital Library
- Kung Chen, Paul Hudak, and Martin Odersky. Parametric type classes. In ACM Conference on LISP and Functional Programming, pages 170--181, 1992. Google Scholar
Digital Library
- E. F. Codd. A relational model of data for large shared data banks. Communications of the ACM, 13 (6): 377--387, 1970. Google Scholar
Digital Library
- E. F. Codd. Normalized data base structure: A brief tutorial. IBM Research Report, San Jose, California, RJ935, 1971.Google Scholar
- E. F. Codd. Further normalization of the data base relational model. IBM Research Report, San Jose, California, RJ909, 1971.Google Scholar
- 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 Scholar
Digital Library
- 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 Scholar
- 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 Scholar
Digital Library
- 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 Scholar
Digital Library
- 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 Scholar
- 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 Scholar
Digital Library
- 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 Scholar
Digital Library
- Mark P. Jones. Simplifying and improving qualified types. In International Conference on Functional Programming Languages and Computer Architecture, pages 160--169, June 1995. Google Scholar
Digital Library
- Mark P. Jones. Simplifying and improving qualified types. Research Report YALEU/DCS/RR-1040, Yale University, New Haven, Connecticut, USA, June 1994.Google Scholar
Cross Ref
- Mark P. Jones. Type classes with functional dependencies. In ESOP 2000: European Symposium on Programming, March 2000. Google Scholar
Digital Library
- 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 Scholar
- 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 Scholar
Digital Library
- 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 Scholar
- Simon Peyton Jones, editor. Haskell 98 Language and Libraries, The Revised Report. Cambridge University Press, 2003.Google Scholar
- 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 Scholar
Digital Library
- David Maier. The Theory of Relational Databases. Computer Science Press, 1983. ISBN 0-914894-42-0. Google Scholar
Digital Library
- 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 Scholar
- 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 Scholar
Digital Library
- 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 Scholar
Digital Library
- 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 Scholar
Digital Library
Index Terms
Language and program design for functional dependencies
Recommendations
Language and program design for functional dependencies
Haskell '08: Proceedings of the first ACM SIGPLAN symposium on HaskellEight 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 ...
Elaboration on functional dependencies: functional dependencies are dead, long live functional dependencies!
Haskell '17Functional dependencies are a popular extension to Haskell's type-class system because they provide fine-grained control over type inference, resolve ambiguities and even enable type-level computations.
Unfortunately, several aspects of Haskell's ...
Elaboration on functional dependencies: functional dependencies are dead, long live functional dependencies!
Haskell 2017: Proceedings of the 10th ACM SIGPLAN International Symposium on HaskellFunctional dependencies are a popular extension to Haskell's type-class system because they provide fine-grained control over type inference, resolve ambiguities and even enable type-level computations.
Unfortunately, several aspects of Haskell's ...







Comments