Functional logic overloading

Functional logic overloading is a novel approach to user-defined overloading that extends Haskell's concept of type classes in significant ways. Whereas type classes are conceptually predicates on types in standard Haskell, they are type functions in our approach. Thus, we can base type inference on the evaluation of functional logic programs. Functional logic programming provides a solid theoretical foundation for type functions and, at the same time, allows for programmable overloading resolution strategies by choosing different evaluation strategies for functional logic programs. Type inference with type functions is an instance of type inference with constrained types, where the underlying constraint system is defined by a functional logic program. We have designed a variant of Haskell which supports our approach to overloading, and implemented a prototype front-end for the language.

[1]  Mark P. Jones,et al.  Typing Haskell in Haskell , 1999 .

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

[3]  Jia-Huai You,et al.  FUNLOG: A Computational Model Integrating Logic Programming and Functional Programming , 1986, Logic Programming: Functions, Relations, and Equations.

[4]  Olivier Danvy Functional Unparsing , 1998, J. Funct. Program..

[5]  Conor McBride Faking it: Simulating dependent types in Haskell , 2002, J. Funct. Program..

[6]  Corrado Moiso,et al.  Kernel-LEAF: A Logic plus Functional Language , 1991, J. Comput. Syst. Sci..

[7]  Ralf Hinze,et al.  A new approach to generic functional programming , 2000, POPL '00.

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

[9]  Johan Jeuring,et al.  PolyP—a polytypic programming language extension , 1997, POPL '97.

[10]  Lennart Augustsson,et al.  Cayenne—a language with dependent types , 1998, ICFP '98.

[11]  Karl Crary,et al.  Intensional polymorphism in type-erasure semantics , 1998, ICFP '98.

[12]  Jean-Marie Hullot,et al.  Canonical Forms and Unification , 1980, CADE.

[13]  D. J. Allerton,et al.  Book Review: GPS theory and practice. Second Edition, HOFFMANNWELLENHOFF B., LICHTENEGGER H. and COLLINS J., 1993, 326 pp., Springer, £31.00 pb, ISBN 3-211-82477-4 , 1995 .

[14]  Michael Hanus,et al.  On the Completeness of Residuation , 1992, JICSLP.

[15]  Stephanie Weirich,et al.  Encoding Intensional Type Analysis , 2001, ESOP.

[16]  Michael Hanus,et al.  A unified computation model for functional and logic programming , 1997, POPL '97.

[17]  Frank Pfenning,et al.  Dependent types in practical programming , 1999, POPL '99.

[18]  Peter J. Stuckey,et al.  Type Classes and Constraint Handling Rules , 2000, ArXiv.

[19]  Mark P. Jones A system of constructor classes: overloading and implicit higher-order polymorphism , 1993, FPCA '93.

[20]  Mark P. Jones,et al.  First-class polymorphism with type inference , 1997, POPL '97.

[21]  Simon Peyton Jones,et al.  Type classes: an exploration of the design space , 1997 .

[22]  Alfred V. Aho,et al.  Compilers: Principles, Techniques, and Tools , 1986, Addison-Wesley series in computer science / World student series edition.

[23]  Karl Crary,et al.  Flexible type analysis , 1999, ICFP '99.

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

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

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

[27]  Joyce L. Vedral,et al.  Functional Programming Languages and Computer Architecture , 1989, Lecture Notes in Computer Science.

[28]  Martin Odersky,et al.  Type Inference with Constrained Types , 1999, Theory Pract. Object Syst..

[29]  GasbichlerMartin,et al.  Functional logic overloading , 2002 .

[30]  Michael Hanus,et al.  The Integration of Functions into Logic Programming: From Theory to Practice , 1994, J. Log. Program..

[31]  Simon L. Peyton Jones,et al.  Type classes in Haskell , 1994, TOPL.

[32]  Robert Harper,et al.  Compiling polymorphism using intensional type analysis , 1995, POPL '95.

[33]  Stefan Kaes,et al.  Parametric Overloading in Polymorphic Programming Languages , 1988, ESOP.

[34]  Simon L. Peyton Jones,et al.  Object-Oriented Style Overloading for Haskell , 2001, BABEL.

[35]  Peter Thiemann,et al.  Program Generation with Class , 1997, GI Jahrestagung.

[36]  Tobias Nipkow,et al.  Type Classes and Overloading Resolution via Order-Sorted Unification , 1991, FPCA.

[37]  Wayne Snyder,et al.  Complete Sets of Transformations for General E-Unification , 1989, Theor. Comput. Sci..

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

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

[40]  Lennart Augustsson,et al.  Implementing Haskell overloading , 1993, FPCA '93.

[41]  Richard Kennaway The Specificity Rule for Lazy Pattern-Matching in Ambiguous Term Rewrite Systems , 1990, ESOP.

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

[43]  Erik Meijer,et al.  Type-indexed rows , 2001, POPL '01.

[44]  John Launchbury,et al.  Implicit parameters: dynamic scoping with static types , 2000, POPL '00.

[45]  John Peterson,et al.  Implementing type classes , 1993, PLDI '93.

[46]  Tobias Nipkow,et al.  Type checking type classes , 1993, POPL '93.

[47]  M. Hanus,et al.  Curry: An Integrated Functional Logic Language , 2003 .