Language and program design for functional dependencies

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.

[1]  Paul Hudak,et al.  Monad transformers and modular interpreters , 1995, POPL '95.

[2]  E. F. CODD,et al.  A relational model of data for large shared data banks , 1970, CACM.

[3]  Peter Thiemann,et al.  A Functional Notation for Functional Dependencies , 2001 .

[4]  Valeria De Antonellis,et al.  Relational Database Theory , 1993 .

[5]  Mark P. Jones Simplifying and improving qualified types , 1995, FPCA '95.

[6]  Simon L. Peyton Jones,et al.  Associated types with class , 2005, POPL '05.

[7]  Mark P. Jones,et al.  High-level views on low-level representations , 2005, ICFP '05.

[8]  Simon L. Peyton Jones,et al.  A history of Haskell: being lazy with class , 2007, HOPL.

[9]  Iavor S. Diatchki High-Level Abstractions for Low-Level Programming , 2007 .

[10]  E. F. Codd,et al.  Further Normalization of the Data Base Relational Model , 1971, Research Report / RJ / IBM / San Jose, California.

[11]  E. F. Codd,et al.  Normalized data base structure: a brief tutorial , 1971, SIGFIDET '71.

[12]  Simon L. Peyton Jones,et al.  Type checking with open type functions , 2008, ICFP.

[13]  Simon L. Peyton Jones,et al.  Understanding functional dependencies via constraint handling rules , 2007, J. Funct. Program..

[14]  Philip Wadler,et al.  How to make ad-hoc polymorphism less ad hoc , 1989, POPL '89.

[15]  Paul Hudak,et al.  Parametric type classes , 1992, LFP '92.

[16]  Mark P. Jones,et al.  The implementation of the Gofer functional programming system , 1994 .

[17]  Mark P. Jones,et al.  Strongly typed memory areas programming systems-level data structures in a functional language , 2006, Haskell '06.

[18]  David Maier,et al.  The Theory of Relational Databases , 1983 .

[19]  W. W. Armstrong,et al.  Dependency Structures of Data Base Relationships , 1974, IFIP Congress.

[20]  Mark P. Jones Qualified Types: Theory and Practice , 1994 .

[21]  Mark P. Jones,et al.  Type Classes with Functional Dependencies , 2000, ESOP.

[22]  Robin Milner,et al.  Principal type-schemes for functional programs , 1982, POPL '82.

[23]  Peyton Jones,et al.  Haskell 98 language and libraries : the revised report , 2003 .

[24]  Stephen Blott An approach to overloading with polymorphism , 1991 .

[25]  Mark P. Jones,et al.  Functional Programming with Overloading and Higher-Order Polymorphism , 1995, Advanced Functional Programming.