[Haskell-cafe] Continuation vs Codensity
silvio
silvio.frischi at gmail.com
Sat Mar 21 14:32:25 UTC 2015
I just saw this
http://stackoverflow.com/questions/25827227/why-cant-there-be-an-instance-of-monadfix-for-the-continuation-monad
Personally, I think the suggested type for callCC
newtype ContT m a = ContT { runContT :: forall r. (a -> m r) -> m r }
class MonadCont m where
callCC :: (forall b. (a -> m b) -> m b) -> m a
is much more intuitive and resembles the actual type of ContT much more
closely then the current callCC and it can be Fixed. So I was wondering
if there was an other reason than convention for not using that type.
Silvio
More information about the Haskell-Cafe
mailing list