Results 1 
3 of
3
Inductive and Coinductive types with Iteration and Recursion
 Proceedings of the 1992 Workshop on Types for Proofs and Programs, Bastad
, 1992
"... We study (extensions of) simply and polymorphically typed lambda calculus from a point of view of how iterative and recursive functions on inductive types are represented. The inductive types can usually be understood as initial algebras in a certain category and then recursion can be defined in ter ..."
Abstract

Cited by 51 (0 self)
 Add to MetaCart
We study (extensions of) simply and polymorphically typed lambda calculus from a point of view of how iterative and recursive functions on inductive types are represented. The inductive types can usually be understood as initial algebras in a certain category and then recursion can be defined in terms of iteration. However, in the syntax we often have only weak initiality, which makes the definition of recursion in terms of iteration inefficient or just impossible. We propose a categorical notion of (primitive) recursion which can easily be added as computation rule to a typed lambda calculus and gives us a clear view on what the dual of recursion, corecursion, on coinductive types is. (The same notion has, independently, been proposed by [Mendler 1991].) We look at how these syntactic notions work out in the simply typed lambda calculus and the polymorphic lambda calculus. It will turn out that in the syntax, recursion can be defined in terms of corecursion and vice versa using polymo...
Monadic Encapsulation of Effects: A Revised Approach (Extended Version)
 Journal of Functional Programming
, 1999
"... Launchbury and Peyton Jones came up with an ingenious idea for embedding regions of imperative programming in a pure functional language like Haskell. The key idea was based on a simple modification of HindleyMilner's type system. Our first contribution is to propose a more natural encapsulation co ..."
Abstract

Cited by 28 (4 self)
 Add to MetaCart
Launchbury and Peyton Jones came up with an ingenious idea for embedding regions of imperative programming in a pure functional language like Haskell. The key idea was based on a simple modification of HindleyMilner's type system. Our first contribution is to propose a more natural encapsulation construct exploiting higherorder kinds, which achieves the same encapsulation effect, but avoids the ad hoc type parameter of the original proposal. The second contribution is a type safety result for encapsulation of strict state using both the original encapsulation construct and the newly introduced one. We establish this result in a more expressive context than the original proposal, namely in the context of the higherorder lambdacalculus. The third contribution is a type safety result for encapsulation of lazy state in the higherorder lambdacalculus. This result resolves an outstanding open problem on which previous proof attempts failed. In all cases, we formalize the intended implementations as simple bigstep operational semantics on untyped terms, which capture interesting implementation details not captured by the reduction semantics proposed previously. 1
DISTRIBUTIVE LAWS IN PROGRAMMING STRUCTURES
, 2009
"... Generalised Distributive laws in Computer Science are rules governing the transformation of one programming structure into another. In programming, they are programs satisfying certain formal conditions. Their importance has been to date documented in several isolated cases by diverse formal approac ..."
Abstract
 Add to MetaCart
Generalised Distributive laws in Computer Science are rules governing the transformation of one programming structure into another. In programming, they are programs satisfying certain formal conditions. Their importance has been to date documented in several isolated cases by diverse formal approaches. These applications have always meant leaps in understanding the nature of the subject. However, distributive laws have not yet been given the attention they deserve. One of the reasons for this omission is certainly the lack of a formal notion of distributive laws in their full generality. This hinders the discovery and formal description of occurrences of distributive laws, which is the precursor of any formal manipulation. In this thesis, an approach to formalisation of distributive laws is presented based on the functorial approach to formal Category Theory pioneered by Lawvere and others, notably Gray. The proposed formalism discloses a rather simple nature of distributive laws of the kind found in programming structures based on lax 2naturality and Gray’s tensor product of 2categories. It generalises the existing more specific notions of distributive