Open nponeccop opened 8 years ago
Your link is broken, but here's a working one.
I remember that, when I mathed it out and undid the innate right bias of the list based form, the Church style Free
MonadPlus
wound up being:
newtype FMP f a = FMP { runFMP :: forall r. Monoid r => (a -> r) -> (f r -> r) -> r }
In retrospect, it's just the crossbreed between FM
and FreeMonoid
, and the instances are all obvious.
There is From monoids to near-semirings: the essence of MonadPlus and Alternative article worth including in
free
.