no continuations

Lennart Augustsson lennart at augustsson.net
Tue Dec 30 14:37:06 EST 2003


I'm not sure what your question means.  You can make your
own continuations, so in that sense Haskell has them.
But perhaps you're asking why Haskell lacks something like
call/cc in Scheme which allows you to grab the current
continuation?
This doesn't play very well with graph reduction (which most
Haskell implementations use), since with graph reduction you will
update application nodes with the result of the computation.
If you have call/cc available you can "jump back in time" and
have a function call return something different, which would
contradict the "cached" result from the previous call.
It's not an insurmountable problem, but it's pretty hairy.

	-- Lennart


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.
> 
> _______________________________________________
> Haskell mailing list
> Haskell at haskell.org
> http://www.haskell.org/mailman/listinfo/haskell
> 




More information about the Haskell mailing list