u/hardwaresoftonin r/haskell • Recommends
Optimizing interpreters for FreeR Monads by using a No-Op Monad & 2 passes?
**Background**
I've been thinking a lot recently about applications needing to be as state-machine-like as possible, and the necessity/benefits of algebras for expressing (and in effect helping limit) what applications can do. These concepts most directly translate to `Free`/`FreeR` `Monad`/`Applicative` in Haskell. The concept can be achieved with `mtl` + typeclasses as a polymorphic `m` give near identical functionality -- you can constrict what the `m` can do with typeclass-based constraints -- this has very similar benefits (and a bit of an escape hatch) but isn't as cleanly expressed IMO.
Recently while readi…