To the top

Page Manager: Webmaster
Last update: 9/11/2012 3:13 PM

Tell a friend about this page
Print version

Linear Haskell: practical… - University of Gothenburg, Sweden Till startsida
Sitemap
To content Read more about how we use cookies on gu.se

Linear Haskell: practical linearity in a higher-order polymorphic language

Journal article
Authors Jean-Philippe Bernardy
Mathieu Boespflug
Ryan Newton
Simon Peyton Jones
Arnaud Spiwack
Published in Proceedings of the ACM on Programming Languages
Volume 2
Issue POPL
Publication year 2018
Published at Department of Philosophy, Linguistics and Theory of Science
Language en
Links https://arxiv.org/pdf/1710.09756
https://doi.org/10.1145/3158093
Keywords GHC, Haskell, laziness, linear logic, linear types, polymorphism, typestate
Subject categories Computer science

Abstract

Linear type systems have a long and storied history, but not a clear path forward to integrate with existing languages such as OCaml or Haskell. In this paper, we study a linear type system designed with two crucial properties in mind: backwards-compatibility and code reuse across linear and non-linear users of a library. Only then can the benefits of linear types permeate conventional functional programming. Rather than bifurcate types into linear and non-linear counterparts, we instead attach linearity to function arrows. Linear functions can receive inputs from linearly-bound values, but can also operate over unrestricted, regular values. To demonstrate the efficacy of our linear type system — both how easy it can be integrated in an existing language implementation and how streamlined it makes it to write programs with linear types — we implemented our type system in ghc, the leading Haskell compiler, and demonstrate two kinds of applications of linear types: mutable data with pure interfaces; and enforcing protocols in I/O-performing functions.

Page Manager: Webmaster|Last update: 9/11/2012
Share:

The University of Gothenburg uses cookies to provide you with the best possible user experience. By continuing on this website, you approve of our use of cookies.  What are cookies?