Typestate: A programming language concept for enhancing software reliability
IEEE Transactions on Software Engineering
Monad transformers and modular interpreters
POPL '95 Proceedings of the 22nd ACM SIGPLAN-SIGACT symposium on Principles of programming languages
A type system for expressive security policies
Proceedings of the 27th ACM SIGPLAN-SIGACT symposium on Principles of programming languages
Tagless staged interpreters for typed languages
Proceedings of the seventh ACM SIGPLAN international conference on Functional programming
Monads for Functional Programming
Advanced Functional Programming, First International Spring School on Advanced Functional Programming Techniques-Tutorial Text
Interactive Programs in Dependent Type Theory
Proceedings of the 14th Annual Conference of the EACSL on Computer Science Logic
Imperative Programming with Dependent Types
LICS '00 Proceedings of the 15th Annual IEEE Symposium on Logic in Computer Science
Combining effects: sum and tensor
Theoretical Computer Science - Clifford lectures and the mathematical foundations of programming semantics
A verified staged interpreter is a verified compiler
Proceedings of the 5th international conference on Generative programming and component engineering
Applicative programming with effects
Journal of Functional Programming
Journal of Functional Programming
Ynot: dependent types for imperative programs
Proceedings of the 13th ACM SIGPLAN international conference on Functional programming
Hoare type theory, polymorphism and separation1
Journal of Functional Programming
ESOP '09 Proceedings of the 18th European Symposium on Programming Languages and Systems: Held as Part of the Joint European Conferences on Theory and Practice of Software, ETAPS 2009
ESOP '09 Proceedings of the 18th European Symposium on Programming Languages and Systems: Held as Part of the Joint European Conferences on Theory and Practice of Software, ETAPS 2009
Finally tagless, partially evaluated: Tagless staged interpreters for simpler typed languages
Journal of Functional Programming
Typestate-oriented programming
Proceedings of the 24th ACM SIGPLAN conference companion on Object oriented programming systems languages and applications
Witnessing Purity, Constancy and Mutability
APLAS '09 Proceedings of the 7th Asian Symposium on Programming Languages and Systems
State Dependent IO-Monads in Type Theory
Electronic Notes in Theoretical Computer Science (ENTCS)
A tactic language for the system Coq
LPAR'00 Proceedings of the 7th international conference on Logic for programming and automated reasoning
Proceedings of the 15th ACM SIGPLAN international conference on Functional programming
Fundamenta Informaticae - Dependently Typed Programming
Resource-Safe systems programming with embedded domain specific languages
PADL'12 Proceedings of the 14th international conference on Practical Aspects of Declarative Languages
Proceedings of the 18th ACM SIGPLAN international conference on Functional programming
Proceedings of the 18th ACM SIGPLAN international conference on Functional programming
Extensible effects: an alternative to monad transformers
Proceedings of the 2013 ACM SIGPLAN symposium on Haskell
Hi-index | 0.00 |
One often cited benefit of pure functional programming is that pure code is easier to test and reason about, both formally and informally. However, real programs have side-effects including state management, exceptions and interactions with the outside world. Haskell solves this problem using monads to capture details of possibly side-effecting computations --- it provides monads for capturing state, I/O, exceptions, non-determinism, libraries for practical purposes such as CGI and parsing, and many others, as well as monad transformers for combining multiple effects. Unfortunately, useful as monads are, they do not compose very well. Monad transformers can quickly become unwieldy when there are lots of effects to manage, leading to a temptation in larger programs to combine everything into one coarse-grained state and exception monad. In this paper I describe an alternative approach based on handling algebraic effects, implemented in the IDRIS programming language. I show how to describe side effecting computations, how to write programs which compose multiple fine-grained effects, and how, using dependent types, we can use this approach to reason about states in effectful programs.