CompSciCabal / SMRTYPRTY

We read computer science books for fun. This is where the secret notes live.
The Unlicense
77 stars 10 forks source link

State in Haskell #77

Open xtreme-james-cooper opened 7 years ago

xtreme-james-cooper commented 7 years ago

By John Launchbury and Simon Peyton Jones https://www.microsoft.com/en-us/research/wp-content/uploads/2016/07/state-lasc.pdf

Basically "The IO Monad, as seen from the other side."

In this paper we describe a way to express stateful algorithms in non-strict, purely functional languages. The approach is a development of our earlier work on monadic I/O and state encapsulation..., but with an important technical innovation: we use parametric polymorphism to achieve safe encapsulation of state. It turns out that this allows mutable objects to be named without losing safety, and it also allows input/output to be smoothly integrated with other state manipulation.