Results 1 - 10
of
110
Comprehending Monads
- Mathematical Structures in Computer Science
, 1992
"... Category theorists invented monads in the 1960's to concisely express certain aspects of universal algebra. Functional programmers invented list comprehensions in the 1970's to concisely express certain programs involving lists. This paper shows how list comprehensions may be generalised to an arbit ..."
Abstract
-
Cited by 418 (11 self)
- Add to MetaCart
Category theorists invented monads in the 1960's to concisely express certain aspects of universal algebra. Functional programmers invented list comprehensions in the 1970's to concisely express certain programs involving lists. This paper shows how list comprehensions may be generalised to an arbitrary monad, and how the resulting programming feature can concisely express in a pure functional language some programs that manipulate state, handle exceptions, parse text, or invoke continuations. A new solution to the old problem of destructive array update is also presented. No knowledge of category theory is assumed.
How to Make Ad-Hoc Polymorphism Less Ad Hoc
, 1988
"... This paper presents type classes, a new approach to ad-hoc 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 315 (3 self)
- Add to MetaCart
This paper presents type classes, a new approach to ad-hoc 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 object-oriented 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 ad-hoc and parametric to distinguish two varieties of polymorphism [Str67]. Ad-hoc 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 292 (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 Curry-Howard 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 272 (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 Curry-Howard 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 cut-elimination.
The Lazy Lambda Calculus
- Research Topics in Functional Programming
, 1990
"... Introduction The commonly accepted basis for functional programming is the -calculus; and it is folklore that the -calculus is the prototypical functional language in puri ed form. But what is the -calculus? The syntax is simple and classical; variables, abstraction and application in the pure cal ..."
Abstract
-
Cited by 218 (3 self)
- Add to MetaCart
Introduction The commonly accepted basis for functional programming is the -calculus; and it is folklore that the -calculus is the prototypical functional language in puri ed form. But what is the -calculus? The syntax is simple and classical; variables, abstraction and application in the pure calculus, with applied calculi obtained by adding constants. The further elaboration of the theory, covering conversion, reduction, theories and models, is laid out in Barendregt's already classical treatise [Bar84]. It is instructive to recall the following crux, which occurs rather early in that work (p. 39): Meaning of -terms: rst attempt The meaning of a -term is its normal form (if it exists). All terms without normal forms are identi ed. This proposal incorporates such a simple and natural interpretation of the -calculus as
Types and persistence in database programming languages
- ACM Computing Surveys
, 1987
"... Databases and have developed one another for Traditionally, the interface between a programming language and a database has either ..."
Abstract
-
Cited by 146 (2 self)
- Add to MetaCart
Databases and have developed one another for Traditionally, the interface between a programming language and a database has either
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 121 (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 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.
A Standard ML Compiler
- Functional Programming Languages and Computer Architecture
, 1987
"... Standard ML is a major revision of earlier dialects of the functional language ML. We describe the first compiler written for Standard ML in Standard ML. The compiler incorporates a number of novel features and techniques, and is probably the largest system written to date in Standard ML. Great atte ..."
Abstract
-
Cited by 89 (14 self)
- Add to MetaCart
Standard ML is a major revision of earlier dialects of the functional language ML. We describe the first compiler written for Standard ML in Standard ML. The compiler incorporates a number of novel features and techniques, and is probably the largest system written to date in Standard ML. Great attention was paid to modularity in the construction of the compiler, leading to a successful large-scale test of the modular capabilities of Standard ML. The front end is useful for purposes other than compilation, and the back end is easily retargetable (we have code generators for the VAX and MC68020). The module facilities of Standard ML were taken into account early in the design of the compiler, and they particularly influenced the environment management component of the front end. For example, the symbol table structure is designed for fast access to opened structures. The front end of the compiler is a single phase that integrates parsing, environment management, and type checking. The m...
Typed Concurrent Objects
- ECOOP'94, LNCS
, 1994
"... Based on a name-passing calculus and on its typing system the paper shows how to build several language constructors towards a strongly-typed objectoriented concurrent programming language. The basic calculus incorporates the notions of asynchronous labelled messages, concurrent objects composed of ..."
Abstract
-
Cited by 70 (10 self)
- Add to MetaCart
Based on a name-passing calculus and on its typing system the paper shows how to build several language constructors towards a strongly-typed objectoriented concurrent programming language. The basic calculus incorporates the notions of asynchronous labelled messages, concurrent objects composed of labelled methods, and a form of abstraction on processes allowing in particular to declare polymorphic classes. We introduce a notion of values as name-expressions, and show how to create subclasses of existing classes. A systematic translation of the derived constructors into the basic calculus provides for semantics and for typing rules for the new constructors. Introduction Concurrent objects constitute a convenient tool to describe concurrent and distributed computations. Types enforce a discipline in the usage of the programming language constructors that not only provides for partial-correctness, but also helps in writing clear programs. Furthermore, a type for a program often gives s...

