Type systems with parametric polymorphism can encode a significant proportion of the information contained in session types. This allows concurrent programming with session-type-like guarantees in languages like ML and Java. However, statically enforcing the linearity properties of session types, in a way that is also natural to program with, is more challenging. Haskell provides various language features that can capture concurrent programming with session types, with full linearity invariants and in a mostly idiomatic style. This chapter overviews various approaches in the literature for session typed programming in Haskell. As a starting point, we use polymorphic types and simple type-level functions to provide session-typed communication in Haskell without linearity. We then overview and compare the varying approaches to implementing session types with static linearity checks. We conclude with a discussion of the remaining open problems. The code associated with this chapter can be found at http://github. com/dorchard/betty-book-haskell-sessions.
CITATION STYLE
Orchard, D., & Yoshida, N. (2017). Session types with linearity in Haskell. In Behavioural Types: from Theory to Tools English (pp. 219–242). River Publishers. https://doi.org/10.1201/9781003337331-10
Mendeley helps you to discover research relevant for your work.