Type Classes with Functional Dependencies

作者: Mark P. Jones

DOI: 10.1007/3-540-46425-5_15

关键词:

摘要: Type classes in Haskell allow programmers to define functions that can be used on a set of different types, with potentially implementation each case. For example, type are support equality and numeric for monadic programming. A commonly requested extension 'multiple parameters' allows more general interpretation as relations has many useful applications. Unfortunately, these examples do not work well practice, leading ambiguities inaccuracies inferred types delaying the detection errors. This paper illustrates kind problems occur multiple parameter classes, explains how they resolved by allowing specify explicit dependencies between parameters. particular novelty this is application ideas from theory relational databases design systems.

参考文章(11)
William Ward Armstrong, Dependency Structures of Data Base Relationships. ifip congress. pp. 580- 583 ,(1974)
Mark P. Jones, Simplifying and improving qualified types international conference on functional programming. pp. 160- 169 ,(1995) , 10.1145/224164.224198
P. Wadler, S. Blott, How to make ad-hoc polymorphism less ad hoc symposium on principles of programming languages. pp. 60- 76 ,(1989) , 10.1145/75277.75283
Kung Chen, Paul Hudak, Martin Odersky, Parametric type classes Proceedings of the 1992 ACM conference on LISP and functional programming - LFP '92. pp. 170- 181 ,(1992) , 10.1145/141471.141536
Paul Hudak, Simon Peyton Jones, Philip Wadler, Brian Boutel, Jon Fairbairn, Joseph Fasel, María M. Guzmán, Kevin Hammond, John Hughes, Thomas Johnsson, Dick Kieburtz, Rishiyur Nikhil, Will Partain, John Peterson, Report on the programming language Haskell: a non-strict, purely functional language version 1.2 Sigplan Notices. ,vol. 27, pp. 1- 164 ,(1992) , 10.1145/130697.130699
Mark P. Jones, A system of constructor classes: overloading and implicit higher-order polymorphism Journal of Functional Programming. ,vol. 5, pp. 1- 35 ,(1995) , 10.1017/S0956796800001210
Simon Peyton Jones, Bulk types with class ,(1996)