
9 Sep
2007
9 Sep
'07
2:02 p.m.
"Cont (Endo b) a" is the usual backtracking monad.
It is? Would you say more about that? A pointer would be fine. I'm
wondering what the role of Endo is here.
Cheers, - Conal
On 9/9/07, David Menendez
On 9/8/07, Conal Elliott
wrote: I'd like to see the following addition to Control.Monad.Cont in mtl:
instance Monoid r => Monoid (Cont r a) where mempty = Cont mempty m `mappend` m' = Cont (runCont m `mappend` runCont m')
Alternatively,
instance Monoid r => MonadPlus (Cont r a) where mzero = Cont mempty mplus a b = Cont $ runCont a `mappend` runCont b
"Cont (Endo b) a" is the usual backtracking monad.