Proposal: Applicative => Monad: Call for consensus

wren ng thornton wren at
Thu Jan 20 07:21:20 CET 2011

On 1/17/11 11:10 PM, David Menendez wrote:
> How are you defining CPS? In order to use id as a continuation in
> these circumstances, you pretty much need
> newtype CPS a = CPS { unCPS :: forall w. (a ->  w) ->  w }

That tends to be my first thought when I think about CPS. In particular, 
the above gets at the fact that the CPS transform compilers do is just 
double negation.

> But that's (mostly) isomorphic to the Identity monad

Indeed. But then, my first thoughts about CPS are more about the 
compiler transformation rather than about callCC. Cont is certainly 
valuable, but it's not the first thing that comes to mind for me.

Live well,

More information about the Libraries mailing list