Results 1 -
3 of
3
How to Declare an Imperative
, 1995
"... How canweintegrate interaction into a purely declarative language? This tutorial describes a solution to this problem based on a monad. The solution has been implemented in the functional language Haskell and the declarative language Escher. Comparisons are given to other approaches to interaction b ..."
Abstract
-
Cited by 94 (3 self)
- Add to MetaCart
How canweintegrate interaction into a purely declarative language? This tutorial describes a solution to this problem based on a monad. The solution has been implemented in the functional language Haskell and the declarative language Escher. Comparisons are given to other approaches to interaction based on synchronous streams, continuations, linear logic, and side effects.
An Operational Semantics for I/O in a Lazy Functional Language
- in Proc Functional Programming Languages and Computer Architecture
, 1993
"... I/O mechanisms are needed if functional languages are to be suitable for general purpose programming and several implementations exist. But little is known about semantic methods for specifying and proving properties of lazy functional programs engaged in I/O. As a step towards formal methods of rea ..."
Abstract
-
Cited by 9 (3 self)
- Add to MetaCart
I/O mechanisms are needed if functional languages are to be suitable for general purpose programming and several implementations exist. But little is known about semantic methods for specifying and proving properties of lazy functional programs engaged in I/O. As a step towards formal methods of reasoning about realistic I/O we investigate three widely implemented mechanisms in the setting of teletype I/O: synchronised-stream (primitive in Haskell), continuationpassing (derived in Haskell) and Landin-stream I/O (where programs map an input stream to an output stream of characters) . Using methods from Milner's CCS we give a labelled transition semantics for the three mechanisms. We adopt bisimulation equivalence as equality on programs engaged in I/O and give functions to map between the three kinds of I/O. The main result is the first formal proof of semantic equivalence of the three mechanisms, generalising an informal argument of the Haskell committee. 1 Introduction and motivation...
A functional specification of effects
, 2009
"... This dissertation is about effects and type theory. Functional programming languages such as Haskell demonstrate that monads can safely encapsulated side effects. If you want to reason about effectful code, however, it is not enough to only encapsulate effects: you must explain their meaning. In thi ..."
Abstract
-
Cited by 6 (0 self)
- Add to MetaCart
This dissertation is about effects and type theory. Functional programming languages such as Haskell demonstrate that monads can safely encapsulated side effects. If you want to reason about effectful code, however, it is not enough to only encapsulate effects: you must explain their meaning. In this dissertation I provide pure specifications of effects in type theory. After initial investigations using Haskell, I show how such specifications can be made total in a language with dependent types. Hoare Type Theory takes an alternative approach to incorporating effects in a dependently typed language. Instead of giving functional specifications, they follow Haskell’s lead and postulate the existence of primitive functions. This dissertation shows how some of these primitives may be implemented in a programming language with dependent types. I believe that functional specifications may provide the foundations on top of which richer logics may be constructed. The results presented in this dissertation may be used to write and verify

