
See also, http://hackage.haskell.org/cgi-bin/hackage-scripts/package/CC-delcont "An implementation of multi-prompt delimited continuations based on the paper, A Monadic Framework for Delimited Continuations, by R. Kent Dybvig, Simon Peyton Jones and Amr Sabry" reset :: MonadDelimitedCont p s m => (p a -> m a) -> m a shift :: MonadDelimitedCont p s m => p b -> ((m a -> m b) -> m b) -> m a ryani.spam:
You might want to take a look at http://www.haskell.org/pipermail/haskell/2007-December/020034.html
which shows an implementation of delimited continuations in Haskell98 and possibly gets rid of any requirement of implementing primitives.
-- ryan
On 2/22/08, Taral
wrote: My understanding of these things is limited, but what would stop me, theoretically speaking, of making a version of ghc with these primitives added:
type Prompt r
reset :: (Prompt r -> r) -> r shift :: Prompt r -> ((a -> _) -> r) -> a
(Where _ is either r or forall b. b)
-- Taral
"Please let me know if there's any further trouble I can give you." -- Unknown _______________________________________________ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe _______________________________________________ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe