Results 1 
7 of
7
Composing Monads
, 1993
"... Monads are becoming an increasingly important tool for functional programming. Different monads can be used to model a wide range of programming language features. However, real programs typically require a combination of different features, so it is important to have techniques for combining severa ..."
Abstract

Cited by 72 (4 self)
 Add to MetaCart
(Show Context)
Monads are becoming an increasingly important tool for functional programming. Different monads can be used to model a wide range of programming language features. However, real programs typically require a combination of different features, so it is important to have techniques for combining several features in a single monad. In practice, it is usually possible to construct a monad that supports some specific combination of features. However, the techniques used are typically adhoc and it is very difficult to find general techniques for combining arbitrary monads. This report gives three general constructions for the composition of monads, each of which depends on the existence of an auxiliary function linking the monad structures of the components. In each case, we establish a set of laws that the auxiliary function must satisfy to ensure that the composition is itself a monad. Using the notation of constructor classes, we describe some specific applications of these constructions. These results are used in the development of a simple expression evaluator that combines exceptions, output and an environment of variable bindings using a composition of three corresponding monads. 1
Computational types from a logical perspective
 Journal of Functional Programming
, 1998
"... Moggi’s computational lambda calculus is a metalanguage for denotational semantics which arose from the observation that many different notions of computation have the categorical structure of a strong monad on a cartesian closed category. In this paper we show that the computational lambda calculus ..."
Abstract

Cited by 56 (6 self)
 Add to MetaCart
Moggi’s computational lambda calculus is a metalanguage for denotational semantics which arose from the observation that many different notions of computation have the categorical structure of a strong monad on a cartesian closed category. In this paper we show that the computational lambda calculus also arises naturally as the term calculus corresponding (by the CurryHoward correspondence) to a novel intuitionistic modal propositional logic. We give natural deduction, sequent calculus and Hilbertstyle presentations of this logic and prove strong normalisation and confluence results. 1
A Semantic analysis of control
, 1998
"... This thesis examines the use of denotational semantics to reason about control flow in sequential, basically functional languages. It extends recent work in game semantics, in which programs are interpreted as strategies for computation by interaction with an environment. Abramsky has suggested that ..."
Abstract

Cited by 32 (5 self)
 Add to MetaCart
(Show Context)
This thesis examines the use of denotational semantics to reason about control flow in sequential, basically functional languages. It extends recent work in game semantics, in which programs are interpreted as strategies for computation by interaction with an environment. Abramsky has suggested that an intensional hierarchy of computational features such as state, and their fully abstract models, can be captured as violations of the constraints on strategies in the basic functional model. Nonlocal control flow is shown to fit into this framework as the violation of strong and weak ‘bracketing ’ conditions, related to linear behaviour. The language µPCF (Parigot’s λµ with constants and recursion) is adopted as a simple basis for highertype, sequential computation with access to the flow of control. A simple operational semantics for both callbyname and callbyvalue evaluation is described. It is shown that dropping the bracketing condition on games models of PCF yields fully abstract models of µPCF.
Environments, Continuation Semantics and Indexed Categories
 Theoretical Aspects of Computer Software, number 1281 in Lect. Notes Comp. Sci
, 1997
"... . There have traditionally been two approaches to modelling environments, one by use of ønite products in Cartesian closed categories, the other by use of the base categories of indexed categories with structure. Recently, there have been more general deønitions along both of these lines: the ørst g ..."
Abstract

Cited by 6 (2 self)
 Add to MetaCart
(Show Context)
. There have traditionally been two approaches to modelling environments, one by use of ønite products in Cartesian closed categories, the other by use of the base categories of indexed categories with structure. Recently, there have been more general deønitions along both of these lines: the ørst generalising from Cartesian to symmetric premonoidal categories, the second generalising from indexed categories with speciøed structure to categories. The added generality is not of the purely mathematical kind; in fact it is necessary to extend semantics from the logical calculi studied in, say, Type Theory to more realistic programming language fragments. In this paper, we establish an equivalence between these two recent notions. We then use that equivalence to study semantics for continuations. We give three category theoretic semantics for modelling continuations and show the relationships between them. The ørst is given by a continuations monad. The second is based on a symmetric prem...
unknown title
"... Abstract. Moggi’s use of monads to factor semantics is used to model the composable continuations of Danvy and Filinski. This yields some insights into the type systems proposed by Murthy and by Danvy and Filinski. Interestingly, modelling some aspects of composable continuations requires a structur ..."
Abstract
 Add to MetaCart
(Show Context)
Abstract. Moggi’s use of monads to factor semantics is used to model the composable continuations of Danvy and Filinski. This yields some insights into the type systems proposed by Murthy and by Danvy and Filinski. Interestingly, modelling some aspects of composable continuations requires a structure that is almost, but not quite, a monad. 1.
Composing monads \Lambda
"... Abstract Monads are becoming an increasingly important tool for functional programming. Different monads can be used to model a wide range of programming language features. However, real programs typically require a combination of different features, so it is important to have techniques for combini ..."
Abstract
 Add to MetaCart
(Show Context)
Abstract Monads are becoming an increasingly important tool for functional programming. Different monads can be used to model a wide range of programming language features. However, real programs typically require a combination of different features, so it is important to have techniques for combining several features in a single monad. In practice, it is usually possible to construct a monad that supports some specific combination of features. However, the techniques used are typically adhoc and it is very difficult to find general techniques for combining arbitrary monads. This report gives three general constructions for the composition of monads, each of which depends on the existence of an auxiliary function linking the monad structures of the components. In each case, we establish a set of laws that the auxiliary function must satisfy to ensure that the composition is itself a monad. Using the notation of constructor classes, we describe some specific applications of these constructions. These results are used in the development of a simple expression evaluator that combines exceptions, output and an environment of variable bindings using a composition of three corresponding monads. 1 Introduction In recent years, the concept of a monad an idea that was originally motivated by highlevel abstract algebra has become an important and practical tool for functional programmers. The reason for this is that monads provide a uniform framework for describing a wide range of programming language features including, for example, state, I/O, continuations, exceptions, parsing and nondeterminism, without leaving the framework of a purely functional language. Many of these techniques were already familiar to functional programmers, but there are many new insights when they are reinterpreted as specific instances of a more general concept.