Linear-base makes writing Linear Haskell easy and fun(tweag.io)
tweag.io
Linear-base makes writing Linear Haskell easy and fun
https://www.tweag.io/blog/2021-02-10-linear-base/
4 comments
> Is there anything like a linear state monad?
Yes! Tweag has a blog post[0] on how there are two different kinds of Functor, linear and non-linear, and in turn, variants of Applicative and Monad.
[0] https://www.tweag.io/blog/2020-01-16-data-vs-control/
Yes! Tweag has a blog post[0] on how there are two different kinds of Functor, linear and non-linear, and in turn, variants of Applicative and Monad.
[0] https://www.tweag.io/blog/2020-01-16-data-vs-control/
Nice!
The Data.Functor vs Control.Monad explained.
The Data.Functor vs Control.Monad explained.
Yes I thought the same, so I rewrote the example with the linear state monad: https://twitter.com/sjoerd_visscher/status/13598540881759641...
Is there anything like a linear state monad? It seems like it would simplify something like Data.Array.Mutable.Linear, where you'd rather not deal explicitly with the "Array a" value returned by every function.