#### DMCA

## First-class Polymorphism with Type Inference (0)

### Cached

### Download Links

Citations: | 53 - 0 self |

### Citations

1714 | The Definition of Standard ML.
- Milner, Tofte, et al.
- 1997
(Show Context)
Citation Context ...nguages, the former often implies the latter; values are stored in a data structure by passing them as arguments to constructor functions, and retrieved using selector functions. In languages like ML =-=[20]-=- and Haskell [8], new types To appear in the Twenty Fourth Annual ACM SIGPLANSIGACT Symposium on Principles of Programming Languages, Paris, France, January 15-17, 1997. Copyright c fl 1997 by the Ass... |

1105 |
A machine-oriented logic based on the resolution principle.
- Robinson
- 1965
(Show Context)
Citation Context ...hat term. This is important because it allows programmers to take advantage of the expressiveness of FCP, without giving up on the convenience of type inference. 5.1 Unification As usual, unification =-=[30]-=- plays a central role in the type inference process. Given two typessands0 , the goal of a unification algorithm is to find the most general substitution U such that Us= Us0 . In this paper, we use a ... |

1076 | A theory of type polymorphism in programming.
- Milner
- 1978
(Show Context)
Citation Context ...n the lists concerned. Indeed, examples like these are often used to illustrate the flexibility of polymorphic type systems. An important property of languages based on the Hindley-Milner type system =-=[6, 19]-=- is that most general, or principal, types for functions like these can be inferred automatically from the types of the constructors Nil and Cons. There is no need for further type annotations. At the... |

593 |
The Implementation of Functional Programming Languages
- JONES, S
- 1987
(Show Context)
Citation Context ... be treated as syntactic sugar for ((K z ):E 0 ) E . Pattern matching against values from datatypes with multiple constructors can be described using a `fatbar' operator, as described by Peyton Jones =-=[25]-=-. The type checking rules for FCP are again justified by appealing to the underlying logic, as explained in Section 2.2. The actual derivations are complicated by the presence of both existential and ... |

517 |
The formulae-as-types notion of construction
- Howard
- 1980
(Show Context)
Citation Context ...condition that x does not appear free in P : (8x :P ) Q) = P ) (8x :Q) (1) (8x :Q ) P) = (9x :Q) ) P (2) (9x :P ) Q) = P ) (9x :Q) (3) (9x :Q ) P) = (8x :Q) ) P (4) Using the Curry-Howard isomorphism =-=[7]-=- as a bridge between logic and type theory, we can use Equation 1 to justify the equivalence: (8a:8x :T a !s) = 8a:T a ! (8x : ) : This result tells us that we can convert an arbitrary term of one typ... |

415 |
Towards a theory of type structure
- Reynolds
- 1974
(Show Context)
Citation Context ...ticular monomorphic instances of polymorphic values to and from functions, rather than the polymorphic values themselves. On the other hand, comparisons with explicitly typed languages, like System F =-=[4, 29]-=-, that do support first-class polymorphism, reveal significant differences in expressiveness. We will see a number of practical examples in later sections that use first-class polymorphism in essentia... |

404 | How to make ad-hoc polymorphism less ad hoc,"
- Wadler, Blott
- 1989
(Show Context)
Citation Context ...a \Gamma \Gamma \Gamma \Gamma \Gamma \Gamma \Gamma \Gamma \Gamma \Gamma Figure 12: Extensions of Hindley-Milner typing Type class overloading, in the form described by Kaes [13], and Wadler and Blott =-=[33]-=-, was probably the first of these three extensions to be incorporated in a widely used programming language. The semantics of the system of type classes in the paper by Wadler and Blott was explained ... |

321 |
Abstract types have existential type
- Mitchell, Plotkin
- 1988
(Show Context)
Citation Context ...tential quantifiers in the types of datatype components. The former provides support for first-class polymorphism, while the latter can be used to deal with examples of first-class abstract datatypes =-=[21]-=- in the style suggested by Perry [23] and refined by Laufer [14, 16]. The main subjects covered in the remaining sections of this paper are as follows: ffl Section 2 shows how ideas from logic can be ... |

277 | Monad transformers and modular interpreters
- Liang, Hudak, et al.
- 1995
(Show Context)
Citation Context ...tation, to provide a typesafe representation for monads [32] as first-class values. Much has been achieved using constructor class overloading [11] to explore the use of monads and monad transformers =-=[2, 18]-=-. As this example suggests, the same experiments can be repeated in FCP by packaging these items up as first-class values. In fact, FCP has exactly the features needed to describe the implementation o... |

262 |
Une extension de l’interprétation de Gödel à l’analyse, et son application à l’élimination de coupures dans l’analyse et la théorie des types.
- Girard
- 1971
(Show Context)
Citation Context ...ticular monomorphic instances of polymorphic values to and from functions, rather than the polymorphic values themselves. On the other hand, comparisons with explicitly typed languages, like System F =-=[4, 29]-=-, that do support first-class polymorphism, reveal significant differences in expressiveness. We will see a number of practical examples in later sections that use first-class polymorphism in essentia... |

229 | A short cut to deforestation.
- Gill, Launchbury, et al.
- 1993
(Show Context)
Citation Context ...elf push' pop top empty) = Stack (push' x self) push' pop top empty top :: Stack a -? a top (Stack self push pop top' empty) = top' self testExpr :: [Int] testExpr = map (top . push 1) [makeListStack =-=[1,2,3]-=-, makeListStack [4,5]] Figure 5: A simple encoding of stack packages tion, hidden by an existential quantifier. Note that our prototype implementation adopts the convention that variables beginning wi... |

197 | A system of constructor classes: Overloading and implicit higher-order polymorphism.
- Jones
- 1993
(Show Context)
Citation Context ...P and higher-order polymorphism in our prototype implementation, to provide a typesafe representation for monads [32] as first-class values. Much has been achieved using constructor class overloading =-=[11]-=- to explore the use of monads and monad transformers [2, 18]. As this example suggests, the same experiments can be repeated in FCP by packaging these items up as first-class values. In fact, FCP has ... |

174 |
The principal type-scheme of an object in combinatory logic.
- Hindley
- 1969
(Show Context)
Citation Context ...n the lists concerned. Indeed, examples like these are often used to illustrate the flexibility of polymorphic type systems. An important property of languages based on the Hindley-Milner type system =-=[6, 19]-=- is that most general, or principal, types for functions like these can be inferred automatically from the types of the constructors Nil and Cons. There is no need for further type annotations. At the... |

160 | Simple type-theoretic foundations for object-oriented programming
- Pierce, Turner
- 1994
(Show Context)
Citation Context ...leans and Church numerals, a facility for using monads [32] as first-class values, a treatment of stacks as abstract datatypes, and the Pierce-Turner representation of objects using existential types =-=[27]-=-. These examples have been tested using a prototype implementation of FCP developed by the author. ffl Section 4 gives a formal definition of FCP, including the treatment of special syntax for constru... |

122 | Lazy functional state threads
- Launchbury, Jones, et al.
- 1994
(Show Context)
Citation Context ...ed in more general ways than our current focus on datatypes and constructor functions might suggest. For example, our framework could also be used to type Launchbury and Peyton Jones' runST construct =-=[17]-=-, and Gill et al.'s build construct [3]. Note that we allow both universal and existential quantifiers in the type of datatype components; this avoids the need to treat constructors with existentially... |

99 | Putting type annotations to work
- Odersky, Läufer
- 1996
(Show Context)
Citation Context ...nsion of ML with both universally and existentially quantified datatype components to model aspects of object-oriented languages, but did not discuss type inference. Recent work by Odersky and Laufer =-=[22]-=- has similar goals to the present paper and permits universal quantification of datatype fields, with an encoding to simulate existential quantification. However, their approach requires a significant... |

71 |
editors). Report on the Programming Language Haskell, A Nonstrict Purely Functional Language (Version 1.2
- Hudak, Jones, et al.
- 1992
(Show Context)
Citation Context ...er often implies the latter; values are stored in a data structure by passing them as arguments to constructor functions, and retrieved using selector functions. In languages like ML [20] and Haskell =-=[8]-=-, new types To appear in the Twenty Fourth Annual ACM SIGPLANSIGACT Symposium on Principles of Programming Languages, Paris, France, January 15-17, 1997. Copyright c fl 1997 by the Association for Com... |

64 | Polymorphic Type Inference and Abstract Data Types.
- Laufer, Odersky
- 1994
(Show Context)
Citation Context ...mer provides support for first-class polymorphism, while the latter can be used to deal with examples of first-class abstract datatypes [21] in the style suggested by Perry [23] and refined by Laufer =-=[14, 16]-=-. The main subjects covered in the remaining sections of this paper are as follows: ffl Section 2 shows how ideas from logic can be used to develop a type system that allows datatypes with components ... |

59 |
The essence of functional programming (invited talk).
- Wadler
- 1992
(Show Context)
Citation Context ... FCP, a mnemonic for First-Class Polymorphism. ffl Section 3 illustrates the expressiveness of FCP. Our examples include a representation for booleans and Church numerals, a facility for using monads =-=[32]-=- as first-class values, a treatment of stacks as abstract datatypes, and the Pierce-Turner representation of objects using existential types [27]. These examples have been tested using a prototype imp... |

58 | Programming objects with ML-ART: An extension to ML with abstract and record types
- Remy
- 1994
(Show Context)
Citation Context ...ified component types. For example, Perry [23] and Laufer [14] have each described extensions of Milner's type inference algorithm that allow datatypes with existentially quantified components. R'emy =-=[28]-=- used an extension of ML with both universally and existentially quantified datatype components to model aspects of object-oriented languages, but did not discuss type inference. Recent work by Odersk... |

56 | The implementation of the gofer functional programming system
- Jones
- 1994
(Show Context)
Citation Context ...plementors of Haskell side-stepped the problems of augmenting the language with general FCP-like constructs by choosing either a more powerful language like System F [5], or a simple untyped language =-=[10]-=- as a target for the translation of source programs. The introduction of constructor classes [11] lead to the discovery of several new uses for overloading. Some of the best known applications---for e... |

56 |
Parametric overloading in polymorphic programming languages,"
- Kaes
- 1988
(Show Context)
Citation Context ...askell + FCP r \Gamma \Gamma \Gamma \Gamma \Gamma \Gamma \Gamma \Gamma \Gamma \Gamma \Gamma \Gamma Figure 12: Extensions of Hindley-Milner typing Type class overloading, in the form described by Kaes =-=[13]-=-, and Wadler and Blott [33], was probably the first of these three extensions to be incorporated in a widely used programming language. The semantics of the system of type classes in the paper by Wadl... |

30 | Type classes with existential types
- Läufer
- 1996
(Show Context)
Citation Context ...omponents whose types are qualified by class constraints. To the best of our knowledge, only the special case of datatypes with existentially quantified components has been considered in work to date =-=[15]-=-. Type inference can be thought of as a compromise between the convenience of programming without type annotations and the expressiveness of explicitly-typed languages. Practical systems include eleme... |

27 | The Implementation of Practical Functional Programming Languages
- Perry
- 1990
(Show Context)
Citation Context ...atatype components. The former provides support for first-class polymorphism, while the latter can be used to deal with examples of first-class abstract datatypes [21] in the style suggested by Perry =-=[23]-=- and refined by Laufer [14, 16]. The main subjects covered in the remaining sections of this paper are as follows: ffl Section 2 shows how ideas from logic can be used to develop a type system that al... |

27 | On the undecidability of partial polymorphic type reconstruction
- Pfenning
- 1993
(Show Context)
Citation Context ...andard presentation of System F requires explicit type annotations for every -bound variable, and the type inference problems for implicitly and partially typed variations of System F are undecidable =-=[34, 1, 26]-=-. Our approach is inspired by rules from predicate calculus that are used to convert logical formulae to prenex form, with all quantifiers at the outermost level. This leads to a system that allows bo... |

27 | Typability and type-checking in the second-order λ-calculus are equivalent and undecidable - Wells - 1994 |

25 |
Typability and Type Checking in the Second-Order - Calculus Are Equivalent and Undecidable. submitted to APAP
- Wells
- 1996
(Show Context)
Citation Context ...andard presentation of System F requires explicit type annotations for every -bound variable, and the type inference problems for implicitly and partially typed variations of System F are undecidable =-=[34, 1, 26]-=-. Our approach is inspired by rules from predicate calculus that are used to convert logical formulae to prenex form, with all quantifiers at the outermost level. This leads to a system that allows bo... |

21 |
Partial polymorphic type inference is undecidable
- Boehm
- 1985
(Show Context)
Citation Context ...andard presentation of System F requires explicit type annotations for every -bound variable, and the type inference problems for implicitly and partially typed variations of System F are undecidable =-=[34, 1, 26]-=-. Our approach is inspired by rules from predicate calculus that are used to convert logical formulae to prenex form, with all quantifiers at the outermost level. This leads to a system that allows bo... |

20 |
Building interpreters by composing monads.
- Jr
- 1994
(Show Context)
Citation Context ...source translation. The ability to reify monads as first-class data structures was also an important part of Steele's work to construct programming language interpreters from reusable building blocks =-=[31]-=-. These ideas can be expressed very neatly in FCP, using essentially the same definitions as in Figure 4. By comparison, Steele found that he had to use a program specializer to circumvent problems ca... |

13 |
editors. Report on the Programming Language Haskell, A Non-strict Purely Functional Language (Version 1.4). Available at http://haskell.org
- Peterson, Hammond
- 1997
(Show Context)
Citation Context ... serve both to illustrate the expressiveness of the system, and to show the notation that is used in our prototype implementation, which is an extension of the Hugs [12] implementation of Haskell 1.3 =-=[24]-=-. The first example is an implementation for booleans using polymorphism and functions. Apart from passing them around as normal first-class entities, the only way that boolean values can be used is t... |

10 |
The glasgow haskell compiler: A retrospective
- Hall, Hammond, et al.
- 1992
(Show Context)
Citation Context ...) = Stack (push' x self) push' pop top empty top :: Stack a -? a top (Stack self push pop top' empty) = top' self testExpr :: [Int] testExpr = map (top . push 1) [makeListStack [1,2,3], makeListStack =-=[4,5]-=-] Figure 5: A simple encoding of stack packages tion, hidden by an existential quantifier. Note that our prototype implementation adopts the convention that variables beginning with an x are existenti... |

3 | On the expressive power of constructor classes
- Duponcheel, Meijer
- 1994
(Show Context)
Citation Context ...tation, to provide a typesafe representation for monads [32] as first-class values. Much has been achieved using constructor class overloading [11] to explore the use of monads and monad transformers =-=[2, 18]-=-. As this example suggests, the same experiments can be repeated in FCP by packaging these items up as first-class values. In fact, FCP has exactly the features needed to describe the implementation o... |

2 |
Hugs 1.3 user manual
- Jones
- 1996
(Show Context)
Citation Context ..., we pause for some examples. These serve both to illustrate the expressiveness of the system, and to show the notation that is used in our prototype implementation, which is an extension of the Hugs =-=[12]-=- implementation of Haskell 1.3 [24]. The first example is an implementation for booleans using polymorphism and functions. Apart from passing them around as normal first-class entities, the only way t... |