Results 1 -
5 of
5
Type classes in Haskell
- ACM Transactions on Programming Languages and Systems
, 1996
"... This paper de nes a set of type inference rules for resolving overloading introduced by type classes. Programs including type classes are transformed into ones which may be typed by the Hindley-Milner inference rules. In contrast to other work on type classes, the rules presented here relate directl ..."
Abstract
-
Cited by 111 (5 self)
- Add to MetaCart
This paper de nes a set of type inference rules for resolving overloading introduced by type classes. Programs including type classes are transformed into ones which may be typed by the Hindley-Milner inference rules. In contrast to other work on type classes, the rules presented here relate directly to user programs. An innovative aspect of this work is the use of second-order lambda calculus to record type information in the program. 1.
Polymorphic Type Inference and Abstract Data Types
- ACM Transactions on Programming Languages and Systems
, 1994
"... Data Types Konstantin Läufer Martin Odersky Loyola University of Chicago Universität Karlsruhe laufer@math.luc.edu odersky@ira.uka.de June 5, 1994 Technical Report LUC-001 Abridged version appeared in Transactions of Programming Languages and Systems Abstract Many statically-typed programming lan ..."
Abstract
-
Cited by 58 (3 self)
- Add to MetaCart
Data Types Konstantin Läufer Martin Odersky Loyola University of Chicago Universität Karlsruhe laufer@math.luc.edu odersky@ira.uka.de June 5, 1994 Technical Report LUC-001 Abridged version appeared in Transactions of Programming Languages and Systems Abstract Many statically-typed programming languages provide an abstract data type construct, such as the module in Modula-2. However, in most of these languages, implementations of abstract data types are not first-class values. Thus they cannot be assigned to variables, passed as function parameters, or returned as function results. Several higher-order functional languages feature strong and static type systems, parametric polymorphism, algebraic data types, and explicit type variables. Most of them rely on Hindley -Milner type inference instead of requiring explicit type declarations for identifiers. Although some of these languages support abstract data types, it appears that none of them directly provides light-weight abstract dat...
Combining Type Classes And Existential Types
, 1994
"... This paper demonstrates that the novel combination of type classes and existential types adds significant expressive power to a language, requiring only a minor syntactic change. We explore this combination in the context of higher-order functional languages with static typing, parametric polymorphi ..."
Abstract
-
Cited by 8 (0 self)
- Add to MetaCart
This paper demonstrates that the novel combination of type classes and existential types adds significant expressive power to a language, requiring only a minor syntactic change. We explore this combination in the context of higher-order functional languages with static typing, parametric polymorphism, algebraic data types, and Hindley-Milner type inference. Since we have examined the underlying type-theoretic issues already, this paper focuses on the practical aspects of our extension. We first examine limitations of existing functional and object-oriented languages. We then give examples to demonstrate how our first-class abstract types with user-defined interfaces address those limitations. Finally, we give an informal description of the translation from our language to a target language without type classes. Our extension equally applies to other languages with similar type systems and is independent of strictness considerations. It has been implemented in the Chalmers Haskell B. s...
Programming with Structures, Functions, and Objects
, 1991
"... We describe program structuring mechanisms for integrating algebraic, functional and objectoriented programming in a single framework. Our language is a statically typed higher-order language with specifications, structures, types, and values, and with universal and existential abstraction over stru ..."
Abstract
-
Cited by 1 (0 self)
- Add to MetaCart
We describe program structuring mechanisms for integrating algebraic, functional and objectoriented programming in a single framework. Our language is a statically typed higher-order language with specifications, structures, types, and values, and with universal and existential abstraction over structures, types, and values. We show that existential types over structures generalize both the necessarily homogeneous type classes of Haskell and the necessarily heterogeneous object classes of object-oriented programming languages such as C++ or Eiffel. Following recent work on ML, we provide separate linguistic mechanisms for reusing specifications and structures. Subtyping is provided in the form of explicit type conversions. The language mechanisms are introduced by examples to emphasize their pragmatic aspects. We compare them with the mechanisms of XML+, Haskell and Eiffel and give a type-theoretic perspective. These mechanisms have been developed within a larger, ongoing prototyping l...
Modularization Constructs For Functional And Object-Oriented Languages
, 1996
"... . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . viii 1. INTRODUCTION . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1 2. BACKGROUND . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3 2.1 Object Model . . . . . . . . . . . . . . . . . . . . . . . ..."
Abstract
- Add to MetaCart
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . viii 1. INTRODUCTION . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1 2. BACKGROUND . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3 2.1 Object Model . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3 2.1.1 Types . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4 2.1.2 Subtype Polymorphism . . . . . . . . . . . . . . . . . . . . . . 6 2.2 Patterns . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 7 2.2.1 Influence of Languages on Patterns . . . . . . . . . . . . . . . 8 2.2.2 Influence of Patterns on Languages . . . . . . . . . . . . . . . 9 2.3 Thesis . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 10 3. PATTERNS . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 13 3.1 Explicit Interface Descriptions . . . . . . . . . . . . . . . . . . . . . . 13 3.1.1 Examples . . . . . . . . . . . . . . . . . . ....

