Results 1  10
of
56
How to Make AdHoc Polymorphism Less Ad Hoc
, 1988
"... This paper presents type classes, a new approach to adhoc polymorphism. Type classes permit overloading of arithmetic operators such as multiplication, and generalise the "eqtype variables" of Standard ML. Type classes extend the Hindley/Milner polymorphic type system, and provide a new approach to ..."
Abstract

Cited by 347 (3 self)
 Add to MetaCart
This paper presents type classes, a new approach to adhoc polymorphism. Type classes permit overloading of arithmetic operators such as multiplication, and generalise the "eqtype variables" of Standard ML. Type classes extend the Hindley/Milner polymorphic type system, and provide a new approach to issues that arise in objectoriented programming, bounded type quantification, and abstract data types. This paper provides an informal introduction to type classes, and defines them formally by means of type inference rules. 1 Introduction Strachey chose the adjectives adhoc and parametric to distinguish two varieties of polymorphism [Str67]. Adhoc polymorphism occurs when a function is defined over several different types, acting in a different way for each type. A typical example is overloaded multiplication: the same symbol may be used to denote multiplication of integers (as in 3*3) and multiplication of floating point values (as in 3.14*3.14). Parametric polymorphism occurs wh...
Theorems for free!
 FUNCTIONAL PROGRAMMING LANGUAGES AND COMPUTER ARCHITECTURE
, 1989
"... From the type of a polymorphic function we can derive a theorem that it satisfies. Every function of the same type satisfies the same theorem. This provides a free source of useful theorems, courtesy of Reynolds' abstraction theorem for the polymorphic lambda calculus. ..."
Abstract

Cited by 330 (6 self)
 Add to MetaCart
From the type of a polymorphic function we can derive a theorem that it satisfies. Every function of the same type satisfies the same theorem. This provides a free source of useful theorems, courtesy of Reynolds' abstraction theorem for the polymorphic lambda calculus.
Computational Interpretations of Linear Logic
 Theoretical Computer Science
, 1993
"... We study Girard's Linear Logic from the point of view of giving a concrete computational interpretation of the logic, based on the CurryHoward isomorphism. In the case of Intuitionistic Linear Logic, this leads to a refinement of the lambda calculus, giving finer control over order of evaluation an ..."
Abstract

Cited by 282 (3 self)
 Add to MetaCart
We study Girard's Linear Logic from the point of view of giving a concrete computational interpretation of the logic, based on the CurryHoward isomorphism. In the case of Intuitionistic Linear Logic, this leads to a refinement of the lambda calculus, giving finer control over order of evaluation and storage allocation, while maintaining the logical content of programs as proofs, and computation as cutelimination.
Type Inclusion Constraints and Type Inference
 In Proceedings of the 1993 Conference on Functional Programming Languages and Computer Architecture
, 1993
"... We present a general algorithm for solving systems of inclusion constraints over type expressions. The constraint language includes function types, constructor types, and liberal intersection and union types. We illustrate the application of our constraint solving algorithm with a type inference sys ..."
Abstract

Cited by 217 (19 self)
 Add to MetaCart
We present a general algorithm for solving systems of inclusion constraints over type expressions. The constraint language includes function types, constructor types, and liberal intersection and union types. We illustrate the application of our constraint solving algorithm with a type inference system for the lambda calculus with constants. In this system, every pure lambda term has a (computable) type and every term typable in the Hindley/Milner system has all of its Hindley/Milner types. Thus, the inference system is an extension of the Hindley/Milner system that can type a very large set of lambda terms. 1 Introduction Type inference systems for functional languages are based on solving systems of type constraints. The best known and most widely used type inference algorithm was first discovered by Hindley and later independently by Milner [Hin69, Mil78]. In its simplest form, the algorithm generates type equations from the program text and then solves the equations. If the equati...
Dynamic typing in a statically typed language
 ACM Trans. Program. Lang. Syst
, 1991
"... Abstract. Dynamic typing can be useful in statically typed languages. We extend the simply typed λcalculus with dynamic typing and elaborate additional features like polymorphism and subtyping. 1 ..."
Abstract

Cited by 154 (4 self)
 Add to MetaCart
Abstract. Dynamic typing can be useful in statically typed languages. We extend the simply typed λcalculus with dynamic typing and elaborate additional features like polymorphism and subtyping. 1
Linear Types Can Change the World!
 PROGRAMMING CONCEPTS AND METHODS
, 1990
"... The linear logic of J.Y. Girard suggests a new type system for functional languages, one which supports operations that "change the world". Values belonging to a linear type must be used exactly once: like the world, they cannot be duplicated or destroyed. Such values require no reference counti ..."
Abstract

Cited by 135 (9 self)
 Add to MetaCart
The linear logic of J.Y. Girard suggests a new type system for functional languages, one which supports operations that "change the world". Values belonging to a linear type must be used exactly once: like the world, they cannot be duplicated or destroyed. Such values require no reference counting or garbage collection, and safely admit destructive array update. Linear types extend Schmidt's notion of single threading; provide an alternative to Hudak and Bloss' update analysis; and offer a practical complement to Lafont and Holmström's elegant linear languages.
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 HindleyMilner inference rules. In contrast to other work on type classes, the rules presented here relate directl ..."
Abstract

Cited by 124 (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 HindleyMilner 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 secondorder lambda calculus to record type information in the program. 1.
Sound Polymorphic Type Inference for Objects
, 1995
"... A polymorphic, constraintbased type inference algorithm for an objectoriented language is defined. A generalized form of type, polymorphic recursively constrained types, are inferred. These types are expressive enough for typing objects, since they generalize recursive types and Fbounded polymor ..."
Abstract

Cited by 104 (9 self)
 Add to MetaCart
A polymorphic, constraintbased type inference algorithm for an objectoriented language is defined. A generalized form of type, polymorphic recursively constrained types, are inferred. These types are expressive enough for typing objects, since they generalize recursive types and Fbounded polymorphism. The wellknown tradeoff between inheritance and subtyping is mitigated by the type inference mechanism. Soundness and completeness of type inference are established. 1 Introduction Type inference, the process of automatically inferring type information from untyped programs, is originally due to Hindley and Milner [16]. These ideas have found their way into some recent innovative programming languages, including Standard ML [17]. The type inference problem for objectoriented languages is a challenging one: even simple objectoriented programs require quite advanced features to be present in the type system. One of the main sources of difficulty lies with binary methods, such as an a...
Type Inference for Recursively Constrained Types and its Application to OOP
, 1995
"... This paper addresses the problem of designing an objectoriented programming language with an effective type inference mechanism. Recently developed programming languages including Standard ML and Haskell incorporate type inference as a core component of the language. However, type inference has yet ..."
Abstract

Cited by 83 (15 self)
 Add to MetaCart
This paper addresses the problem of designing an objectoriented programming language with an effective type inference mechanism. Recently developed programming languages including Standard ML and Haskell incorporate type inference as a core component of the language. However, type inference has yet to achieve practical application to objectoriented programming languages. We strongly feel the core type features necessary to model objectoriented programming with type inference include a notion of subtyping [CW85], and a notion of "recursively constrained polymorphism," a generalization of Fbounded polymorphism [CHC90, CCH
A Statically Safe Alternative to Virtual Types
, 1998
"... Parametric types and virtual types have recently been proposed as extensions to Java to support genericity. In this paper we investigate the strengths and weaknesses of each. We suggest a variant of virtual types which has similar expressiveness, but supports safe static type checking. This resu ..."
Abstract

Cited by 78 (14 self)
 Add to MetaCart
Parametric types and virtual types have recently been proposed as extensions to Java to support genericity. In this paper we investigate the strengths and weaknesses of each. We suggest a variant of virtual types which has similar expressiveness, but supports safe static type checking. This results in a language in which both parametric types and virtual types are wellintegrated, and which is statically typesafe.