| Cordelia Hall, Kevin Hammond, Simon Peyton Jones, and Philip Wadler. Type classes in Haskell. In European Symposium On Programming, number 788 in LNCS, pages 241-- 256. Springer-Verlag, 1994. |
....and a closed world approach is usually re ected in the formulation of the quanti er introduction rule. In an open world approach, one does not have full knowledge about the whole world. There might be some facts which are not known yet. To be more speci c, I consider Haskell style type classes [VHJW96, Jon92, NP95]. There are constraints of the form C which denotes that belongs to the class C. Haskell s type class system follows an open world approach, i.e. even empty type classes are considered legal. Consider the following typing judgment: Eq ; x: y:eq x y : Bool where I assume the type ....
Cordelia V.Hall, Kevin Hammond, Simon L. Peyton Jones, and Philip L. Wadler. Type classes in Haskell. ACM TOPLAS, 18(2):109{ 138, March 1996.
.... parameters of those fully polymorphic functions may themselves be fully polymorphic functions, ad in nitum) Various calculi which model the type systems of object oriented programming languages have been studied in great detail [21, 85] Various other language extensions such as type classes [27, 43, 47, 75, 82] and existential types [51] have also traditionally been formulated in a form of calculus. Given the connection between functional programming and calculus, it is not surprising that modern functional programming languages typically have much richer type systems than other programming ....
....the same as the type system of Mercury before type classes and existential types were introduced. In the following chapters, we present type classes and existential types as extensions of this type system. 26 Type Classes The type systems of modern functional languages such as Haskell [27], Gofer [46] and Concurrent Clean [76] have signi cant extensions to the Hindley Milner type system. Their most important extension is their support for constrained genericity through type classes. A type class speci es an interface consisting of one or more methods. A type can be declared to be ....
[Article contains additional citation context not shown here]
Cordelia Hall, Kevin Hammond, Simon Peyton Jones, and Philip Wadler. Type classes in Haskell. In European Symposium on Programming, volume 788 of Lecture Notes in Computer Science, pages 241-256. Springer Verlag, 1994.
....narrowing as described in Sections 6.1 and 6.3. 8. RELATED WORK There have been many approaches to adding overloading to languages with a Hindley Milner style polymorphic type system, beginning with Kaes [33] and Wadler and Blott [49] and later picked up, refined, and implemented by many others [40, 5, 39, 3, 26, 42, 15, 27, 29, 43, 35, 31]. In particular, recent work is pushing hard the borders of complete and decidable type inference [45, 46] In the face of this plethora, we only consider the most closely related work here. The work of Jones [27] and its extension to constructor classes [26] provides a general framework for type ....
C. Hall, K. Hammond, S. Peyton Jones, and P. Wadler. Type classes in Haskell. In D. Sannella, editor, Proc. 5th European Symposium on Programming, number 788 in Lecture Notes in Computer Science, pages 241--256, Edinburgh, UK, Apr. 1994. Springer-Verlag.
....passed to Method. The ASSUME Dynamic[alpha] concept is the one and only extension we need to add to the Opal language (but a generalisation of this construct is part of the forthcoming Opal 2 language [5] The construct is similar to conditional polymorphism provided by Haskell s type classes [7], and Dynamic can be modelled in Haskell as a builtin type class whose instances are automatically generated by the compiler. This will be discussed in the conclusion. 2.2 Inspection Interface The core reflection interface presented in the previous section provides dynamic types. But the ....
Cordelia V. Hall, Kevin Hammond, Simon L. Peyton Jones, and Philip Wadler. Type Classes in Haskell. In ESOP, Jan 1994.
....to the kinds of constructs considered in this paper, and this forms a large area for potential future research. Many more constructs could be systematically encoded at the level of ILX. Some constructs we have considered adding to ILX in the future are: Backtracking; Type classes [12]; Compound types [3] Join style synchronization points; Covariant return types and contravariant argument types. 12 Finally, the implementation techniques described in this paper are still under development and require further, continual investigations as the target .NET platform ....
C.V. Hall, K. Hammond, S.L. Peyton Jones, and P.L. Wadler. Type classes in Haskell. In European Symposium On Programming, number 788 in LNCS, pages 241---256. Springer Verlag, April 1994.
....specialization would yield a more exible calculus suitable for an intermediate language for implementing various advanced features of polymorphic languages. There are also several recent papers for various type passing calculi and optimization methods based on type information such as [39, 11, 33]. Compared with these methods, the feature that distinguishes our approach is a type theoretical treatment of static computation of type attributes by treating attribute values as types. This feature may be useful for re ning those type passing calculi. One promising approach toward this direction ....
C. Hall, K. Hammond, S. Peyton Jones, and P. Wadler. Type classes in Haskell. Technical report, University of Glasgow, 1994.
....parametric polymorphism, where explicit type instantiations resolve the ambiguities that may otherwise arise when combining scaling and polymorphism, see Example 3. Also, our proposed system extends the notion of what a scalar value is. The resolution of class based overloading in Haskell [8] and related systems of overloading [17] use combined type inference and rewrite systems somewhat reminiscent of ours. However, there are several important differences between this and our proposed approach, among which these are the most important. It requires a language with type classes or ....
Cordelia V. Hall, Kevin Hammond, Simon L. Peyton Jones, and Philip L. Wadler. Type classes in Haskell. ACM Trans. Program. Lang. Syst., 18(2):109--138, March 1996.
.... The ASSUME Dynamic[alpha] concept is the one and only extension we need to add to the Opal language (but a generalisation of this construct is part of the forthcoming Opal 2 language [5] The construct is in fact quite similar to conditional polymorphism provided by Haskell s type classes [7], and Dynamic can be modelled in Haskell as a builtin type class whose instances are automatically generated by the compiler. This will be discussed in the conclusion. 2.2 Inspection Interface The core re ection interface presented in the previous section provides dynamic types. Actual re ection ....
Cordelia V. Hall, Kevin Hammond, Simon L. Peyton Jones, and Philip Wadler. Type Classes in Haskell. In ESOP, Jan 1994.
....a character from the standard input and returns this character, whereas putChar c prints character c to the standard output and returns no value. The monadic I O approach allows for both automatic and manual error handling. 1 Constructor classes are a natural generalisation of type classes [42, 133] in Haskell, which combined overloading and higher order polymorphism. 54 type IO a = ST RealWorld (Either IOError a) data Either a b = Left a Right b catch : IO a (IOError IO a) IO a try : IO a IO (Either IOError a) Within the monadic framework, I O actions are composable. ....
Cordelia V. Hall, Kevin Hammond, Simon L. Peyton Jones, and Philip Wadler. Type Classes in Haskell. In ESOP, January 1994.
....its typing system proves to be a blessing and reasoning within HOL comes close enough to informal mathematics. A large number of applications of HOL can be found in the literature [8, 35, 36, 52, 56, 57, 58, 59, 65, 74] An extension [55, 75] of the type system with Haskell style type classes [33] as implemented in Isabelle HOL [63] adds further exibility. 2.3.2 Deep vs. Shallow Embedding Formalizing a logic or a language in a formal system is sometimes referred to as an embedding. Formalizing only the semantic operators, translating syntax to semantic structures by an extralogical ....
Cordelia V. Hall, Kevin Hammond, Simon L. Peyton Jones, and Philip Wadler. Type classes in Haskell. In Donald Sannella, editor, Programming Languages and Systems|ESOP'94, 5th European Symposium on Programming, volume 788 of Lecture Notes in Computer Science, pages 241-256, Edinburgh, U.K., 11-13 April 1994. Springer.
....1 Introduction The area of Hindley Milner [Mil78] style type systems has been extensively studied in the last couple of years. We only mention a selected number of papers which extend the expressiveness of the Hindley Milner type system, such as record systems [Oho95, R em89, Wan89] overloading [Kae92, VHJW96, CHO92, OWW95, NP95] and subtyping [AW93, EST95b, Smi91] Variations of the Hindley Milner system are also popular to perform certain kind of program analysis, such as [Ken94, DHM95, TJ92] More general frameworks have been introduced by Jones [Jon92] and Odersky Sulzmann Wehr [OSW99] In our own work we introduced ....
Cordelia V.Hall, Kevin Hammond, Simon L. Peyton Jones, and Philip L. Wadler. Type classes in Haskell. ACM TOPLAS, 18(2):109-- 138, March 1996.
....to views. Like views, Haskell s type classes allow a distributed definition of functionality over data types. Qualification of type variables in a qualified type corresponds to F bounded qualification of views [CCH 89] A number of di#erent designs for type classes have been developed [HHPW94, NP93, Jon92, Jon93, Jon00] Our view proposal is most closely related to parametric type classes [CHO92] in that the bound of a type variable a may have additional parameters other than a itself. Type classes are usually studied in systems without subtyping. Where subtyping is added [Kae92] ....
Cordelia Hall, Kevin Hammond, Simon Peyton Jones, and Philip Wadler. Type classes in Haskell. In Proc. 5th European Symposium on Programming, pages 241--256, 1994. Springer LNCS 788.
....Federal de Ouro Preto, DECOM ICEB Ouro Preto 35400 000, Brasil Abstract. This article presents a type system based on the DamasMilner system[DM82] that supports overloading. Types of overloaded symbols are constrained polymorphic types. The work is related to Haskell type classes[Wad89,NP93,HHJW96] System O[OWW95] and other similar type systems[Kae88,Smi91,Jon94,DCO96] Restrictions imposed in these systems with respect to overloading are eliminated. User defined global and local overloading is supported without restrictions. There is no need for declarations or annotations of any ....
.... a list a bool, involves a special type variable a, constrained so that its instances must admit equality. In Miranda, this type is not constrained in this way; applying member to lists whose elements are functions generates a run time error. In Haskell[Pe97,Tho96] type classes[NP93,HHJW96] allow overloaded symbols to have different meanings in contexts requiring different types. Type classes represented a big step forward, in the direction of providing comprehensive support for overloading, together with polymorphism and type inference. However, the following points can be viewed ....
[Article contains additional citation context not shown here]
Cordelia Hall, Kevin Hammond, Simon Peyton Jones, and Philip Wadler. Type Classes in Haskell. ACM TOPLAS, 18(2):109--138, March 1996.
....Structures and Data Organization Am Fasanengarten 5, 76128 Karlsruhe, Germany fsulzmann,odersky,wehrg ira.uka.de 1 Introduction There are many type systems that extend the Hindley Milner [Mil78] system with constraints. Examples are found in record systems [Oho95, Rem89] overloading [Jon92, HHJW96, NP93, KC92, OWW95] and systems that support subtyping [CCH 89, BSvG95, AW93, EST95] Extensions of Hindley Milner with constraints are also increasingly popular in program analysis [DHM95, TJ92] Even though these type systems use different constraint domains, they are largely alike in ....
Cordelia V. Hall, Kevin Hammond, Simon L. Peyton Jones, and Philip L. Wadler. Type classes in haskell. TOPLAS, 18(2):109--138, March 1996.
....directed specialization would yield a more flexible calculus suitable for an intermediate language for implementing various advanced features of polymorphic languages. There are also several recent papers for various type passing calculi and optimization methods based on type information such as [34, 8, 28]. Compared with these methods, the feature that distinguishes our approach is a type theoretical treatment of static computation of type attributes by treating attribute values as types. This feature may be useful for refining those type passing calculi. One promising approach toward this ....
C. Hall, K. Hammond, S. Peyton Jones, and P. Wadler. Type classes in Haskell. Technical report, University of Glasgow, 1994.
.... well typed programs do not go wrong . This means that a well typed program will never cause a run time type error, even though the semantics of the typed program is equivalent to the semantics of the same program ignoring the types. The type systems of modern functional languages such as Haskell[2] and Gofer[6] have significant extensions to the Hindley Milner type system. Their most important extension is their support for constrained forms of genericity through type classes. A type class specifies an interface consisting of one or more methods. A type can be declared to be a member of a ....
....of types to be a member of a type class, and this vector of types is known to be a member of a subclass of this type class. 2. 5 Translation For Haskell, the semantics of a program using type classes is defined by a simple source to source transformation to a program which does not use type classes[2, 13]. This transformation is also used in the implementations of the language. We take a similar approach here. In this section, we informally describe the translation, leaving a more formal approach until section 3. Each constraint in the type signature of a predicate adds an extra argument to each ....
[Article contains additional citation context not shown here]
Cordelia Hall, Kevin Hammond, Simon Peyton Jones, and Philip Wadler. Type classes in Haskell. In European Symposium on Programming, volume 788 of Lecture Notes in Computer Science. Springer Verlag, 1994.
....language Henk [24] and helped to keep Haskell on its toes [23, 20, 21] 3 Classes and algebraic data types Mondrian unifies algebraic types and type classes into a single, simple minded, object oriented class mechanism. Dictionaries that are used in the Haskell implementation of type classes [14, 9, 30] are nothing more than algebraic data types with polymorphic fields. Structures with polymorphic components are completely standard and already supported by several existing Haskell implementations [18, 28] When class dictionaries are first class values, algebraic data types can be modeled by a ....
C.V. Hall, K. Hammond, S.L. Peyton Jones, and P. Wadler. Type Classes in Haskell. In Proc. ESOP, volume LNCS 788, 1994.
....cannot introduce free type variables into . 7 A Translational Semantics In this section, we present a semantics for Exell by translation to a suitable target language. Our approach is based on the original compile time translation scheme by Wadler and Blott (1989) which was further developed by Hall, Hammond, Peyton Jones, and Wadler (1992). The basic idea is to eliminate classes in favor of run time method dictionaries that contain instances for particular types of the overloaded functions associated with a class. An identifier given a polymorphic type scheme in the original environment is typed as a function in the translated ....
....of classes: h = C x ( f C) x 3) f C) x True) The expression f C is the component of the dictionary C corresponding to the overloaded function f. The problem is that C is used in two different polymorphic instances Therefore the translated program cannot be typed in the ML system. Hall et al. 1992) solve this problem by translating Haskell into the second order l calculus. Similarly, we translate Exell into the language MPS, an implicitly typed second order l calculus with existentially quantified and recursive types (MacQueen et al. 1986) whose properties are summarized in Appendix B. ....
Hall, C., Hammond, K., Peyton Jones, S., and Wadler, P. 1992. Type classes in Haskell. Technical report, Department of Computer Science, University of Glasgow.
....these would be, or what complications they would introduce. Also, what is the relation with other extensions of functional programming languages aimed at supporting code reuse or limited forms of object orientation There are several of these extensions, for instance the class mechanism in Haskell [HHJW96] which also allows some form of overloading , the combination of this class mechanism with existential types [Lau96] and the experimental Haskell dialect called Mondrian [MC97] The notion of co inheritance for inductive types introduced here provides a different perspective on inheritance ....
C. Hall, K. Hammond, S.L. Peyton Jones, and P. Wadler. Type classes in Haskell. TOPLAS, 18(2):pp.109--138, March 1996.
....of parametric polymorphism has been used as the basic building block in the design of type systems for various programming languages. A number of extensions have been proposed to increase the expressiveness of the Hindley Milner type system, such as record systems [Oho95,R em89,Wan89] overloading [Kae92,VHJW96,CHO92,OWW95,NP95] and subtyping [AW93,EST95,Smi91] A general theory of qualified types has been studied by Jones [Jon92] He used his system to study record and overloading systems. Based on these approaches, some even more advanced systems [Nis98,JJM97,Weh97] have recently been proposed. The first systems deals ....
....of the quantifier introduction rule. First, we consider an open world approach. In an open world approach we assume that we do not have full knowledge about the whole world. There might be some facts about which we are not aware yet. To be more specific, we consider Haskell style type classes [VHJW96,Jon92,NP95]. There we have constraints of the form C which denotes that belongs to the class C. Haskell s type class system follows an open world approach. Even empty type classes are considered legal. Consider the following typing judgment Eq ff; x:y:eq x y : ff ff Bool where we assume that we ....
Cordelia V.Hall, Kevin Hammond, Simon L. Peyton Jones, and Philip L. Wadler. Type classes in Haskell. ACM TOPLAS, 18(2):109--138, March 1996.
....parametric polymorphism has been used as the basic building block in the design of type systems for various programming languages. A number of extensions have been proposed to increase the expressiveness of the Hindley Milner type system, such as record systems [Oho95, R em89, Wan89] overloading [Kae92, VHJW96, NP93, CHO92, OWW95] and subtyping [AW93, EST95, Smi91] A general theory of qualified types has been studied by Jones [Jon92] He used his system to study record and overloading systems. Based on these approaches, some even more advanced systems [Nis98, JJM97, Weh97] have recently been proposed. All these systems ....
....of the quantifier introduction rule. First, we consider an open world approach. In an open world approach we assume that we do not have full knowledge about the whole world. There might be some facts about which we are not aware yet. To be more specific, we consider Haskell style type classes [VHJW96, NP93, Jon92]. There we have constraints of the form C which denotes that belongs to the class C. Haskell s type class system follows an open world approach. Even empty type classes are considered legal. Consider the following typing judgment Eq ff; x:y:eq x y : ff ff Bool where we assume that we ....
[Article contains additional citation context not shown here]
Cordelia V.Hall, Kevin Hammond, Simon L. Peyton Jones, and Philip L. Wadler. Type classes in Haskell. ACM TOPLAS, 18(2):109-- 138, March 1996.
....Some Gadget attributes are specific to a particular Gadget (e.g. buttonMomentary) but can have a default value. Others are common to many Gadgets (e.g. width and height) and we would like to use the same name regardless of the particular type of Gadget. Here the type classes of Haskell prove useful [HHPJW94]. Attributes are made a type class, of which an attribute type such as ButtonAttributes is an instance. Each type of Gadget defines its own overloaded versions of common modifiers such as width to alter its particular attribute datatype. Modifiers for attributes specific to a particular Gadget ....
Cordelia V. Hall, Kevin Hammond, Simon L. Peyton Jones, and Philip Wadler. Type classes in haskell. In European Symposium on Programming, volume 788 of LNCS. Springer-Verlag, April 94.
....Fuzzy truth values are represented using the Haskell type Double. The connectives are implemented by overloading the operators , etc. so that they work on fuzzy values as well as boolean ones. This is done by shadowing the connectives (see above) and placing the connectives in a class (Hall et al. 1996; Jones, 1995; Peyton Jones et al. 1997) class Logic a where true, false : a ( a a a not : a a The functions and, or, etc. are then also overloaded so that they now operate on instances of the Logic class, rather than just the Bool type as before: and, or : Logic a ....
Hall, Cordelia, Hammond, Kevin, Peyton Jones, Simon, & Wadler, Philip. (1996). Type classes in Haskell. Acm Transactions on Programming Languages and Systems, 18(2), 109--138.
....function elem that determines if a value is an element of a list using the overloaded function ( A non overloaded version fnElem that explicitly passes the equality function, is also given. Dictionaries The standard mechanism for implementing overloading has been to use method dictionaries (Hall et al. 1994]; Wadler Blott [1989] though various optimisations and alternative schemes have been proposed (Augustsson [1993] Jones [1992] Each overloaded function is given an extra argument that contains the methods for the particular type at which the function is being applied. The dictionary is given ....
C Hall, K Hammond, SL Peyton Jones & P Wadler [Jan 1994], "Type Classes in Haskell," Research Report FP-94-04, Dept of Computer Science, University of Glasgow.
....gave an early survey about general research directions. Reynolds [Rey85] and Mitchell [Mit84] are foundational papers that develop basic concepts of constraints and subtyping. There are examples for extensions of the Hindley Milner system with records [Oho95, Rem89] overloading [Jon92, Kae92, HHJW96, NP93, KC92, OWW95] and subtyping [CCH 89, BSvG95, AW93, EST95b] Extensions of Hindley Milner with constraints are also increasingly popular in program analysis [DHM95, TJ92] Palsberg [Pal95] gave an efficient inference algorithm for a calculus of objects. The main feature of his system is ....
Cordelia V. Hall, Kevin Hammond, Simon L. Peyton Jones, and Philip L. Wadler. Type classes in haskell. TOPLAS, 18(2):109--138, March 1996.
No context found.
Cordelia Hall, Kevin Hammond, Simon Peyton Jones, and Philip Wadler. Type classes in Haskell. In European Symposium On Programming, number 788 in LNCS, pages 241-- 256. Springer-Verlag, 1994.
....A word about overloading Sequencing by means of the do construct, and command injection (via return) are not limited to the Cmd monad. Indeed, just as in Haskell, these fundamental operations are overloaded and available for any type constructor that is an instance of the type class Monad [9, 11]. Type classes and the overloading system will not be covered in this paper, partly because this feature constitutes a virtually orthogonal complement to the subtyping system of Timber, and partly because we do not capitalize on overloading in any essential way. In particular, monadic programming ....
Cordelia V. Hall, Kevin Hammond, Simon L. Peyton Jones and Philip Wadler. Type classes in Haskell. In 5th European Symposium on Programming, 1994, Edinburgh, Scotland: Springer Verlag, Lecture Notes in Computer Science vol. 788.
.... Haskell in order to provide a uniform framework for overloading [WB89] It must have been an idea whose time had come, as it was independently described by Kaes [Kae88] Since then type classes have attracted considerable attention, with many refinements and variants being described [NS91, NP93, HHPW94, Aug93, PJ93, Jon92b, CHO92, Jon93] They have also attracted some criticism [App93] In our view, one of the most serious criticisms of type classes is that a program cannot be assigned a meaning independent of its types. A consequence of this is that two of Institut fur Programmstrukturen, ....
....to record typing. Much of the later work on overloading is driven by the design and implementation of Haskell s type classes, e.g. Nipkow et al. NS91, NP93] on type reconstruction, Augustsson [Aug93] and Peterson and Jones [PJ93] on implementations, and Hall, Hammond, Peyton Jones and Wadler [HHPW94] on the formal definition of type classes in Haskell. We have already compared our system to that of Haskell. Other generalisations of Haskell type classes have been proposed. Wadler and Blott, and Jones, consider type classes with multiple type variables [WB89, Jon92b] Chen, Hudak and Odersky s ....
Cordelia Hall, Kevin Hammond, Simon Peyton Jones, and Philip Wadler. Type classes in Haskell. In Proc. 5th European Symposium on Programming, pages 241--256, 1994. Springer LNCS 788.
.... ys = False elem : Eq a = a [a] Bool elem v l = scc elem case l of [ False x:xs v = x elem v xs seenStr : Char] Char] Bool seenStr str seen = scc seenStr elem str seen The standard mechanism for implementing overloading has been to use method dictionaries [Hall et al. 1994; Wadler and Blott 1989] though various optimizations and alternative schemes have been proposed [Augustsson 1993; Jones 1992] Each overloaded function is given an extra dictionary argument that contains the methods for the particular type at which the function is being applied. The dictionary ....
Hall, C. V., Hammond, K., Peyton Jones, S. L., and Wadler, P. L. 1994. Type classes in Haskell. In the European Symposium on Programming (ESOP'94), D. Sannella, Ed.,Lecture Notes in Computer Science, vol. 788. Springer-Verlag, Berlin, 241--256.
No context found.
Cordelia Hall, Kevin Hammond, Simon Peyton Jones, and Phillip Wadler. Type classes in haskell. In Proceedings of the European Symposium on Programming, volume 788 of Lecture Notes in Computer Science, pages 241-256. Springer Verlag, April 1994.
No context found.
Cordelia V. Hall, Kevin Hammond, Simon L. Peyton Jones, and Philip Wadler. Type classes in haskell. In ESOP, Jan 94.
No context found.
Hall, C., Hammond, K., Peyton Jones, S., and Wadler, P. (1994). Type classes in Haskell. In European Symposium on Programming, volume 788 of Lecture Notes in Computer Science. Springer Verlag.
No context found.
Cordelia Hall, Kevin Hammond, Simon Peyton Jones, and Philip Wadler. Type Classes for Haskell. In Donald Sannella, editor, ESOP '94 --- 5th European Symposium on Programming Languages and Systems, Lecture Notes in Computer Science, pages 241--256, Edinburgh, UK, April 11--13, 1994. Springer, Berlin. BIBLIOGRAPHY 84
No context found.
VHJW96. Cordelia V.Hall, Kevin Hammond, Simon L. Peyton Jones, and Philip L. Wadler. Type classes in Haskell. ACM TOPLAS, 18(2):109--138, March 1996.
Online articles have much greater impact More about CiteSeer.IST Add search form to your site Submit documents Feedback
CiteSeer.IST - Copyright Penn State and NEC