|
|
|
|
|
by moomin
3361 days ago
|
|
Monads and monad transformers are different things, of course. However, it's all really quite doable in Haskell. There's two main reasons it's _not_ done, though: a) effect style isn't so great when the effects don't commute b) it's slower. If someone ever cracks the speed thing, I bet you'll see a lot more Haskell with Eff monads in it. |
|
With the second version we depend on multiple type classes to combine languages and implement them for different types to get different interpreters. The big advantage with this approach is that we don't have to construct the adt's before interpreting which is where the speed difference comes from.
Tl;dr: if you want to go fast you have to skip constructing adts and if you do that you end up with something like haskell's mtl.