On Tue, 30 Dec 2003 10:38:33 -0800 (PST)
Ben Rudiak-Gould <[EMAIL PROTECTED]> wrote:

> On Tue, 30 Dec 2003, Scott wrote:
> > Why does Haskell have no continuations?
> > (http://www.haskell.org/hawiki/CoMonad)
> > If continuations are incompatible with non-strict semantics, I'd 
> > appreciate an explanation.

> Unrestricted call/cc seems to be incompatible with referential
> transparency in a very fundamental way, and Haskell is nothing without
> referential transparency. On the other hand, it doesn't cause any
> problems when the evaluation order is fixed by some monad, whence
> MonadCont.

Indeed, the simplest example is probably implementing exceptions with

Assuming a callCC function what does the following return,
callCC (\k -> k 1 + k 2)?

Haskell mailing list

Reply via email to