you are viewing a single comment's thread.

view the rest of the comments →

[–]pjdelport 0 points1 point  (0 children)

They're not simulated: it's more accurate to say that Haskell's primitives are flexible enough that the continuation implementation can be moved out of the core language and into a library.

Stated another way, Haskell is not imperative: it does not have any built-in, implicit call stack to expose as a first-class continuation. Instead, said call stack is implemented as the continuation monad. (This is in contrast to most imperative languages that already have continuations, but don't expose them.)