I'm curious if the CP-style Task wrapper outlined at https://youtu.be/7SidSvJcPd0?t=2064 ever got implemented? Was there a reason that got dropped in favor of the current approach? Just trying to learn some of the internals and the design decisions behind them.
we're still working on implementing it!
it's being worked on as recently as earlier today :big_smile:
Oh I see :)
I was trying to use this pattern for a Haskell project I was working on and gave up after realizing that I would need to enumerate all the possible types for the continuations in the Operation
type:
data Operation = Op1 (Int -> Operation) | Op2 (String -> Operation) | ...
type Effect a = (a -> Operation) -> Operation
(it didn't seem like there was an easy way to make Operation
polymorphic in this case)
I'm guessing that Roc doesn't have this problem because all the operations are well defined and finite in number?
yeah exactly
the platform knows exactly which operations it supports!
Last updated: Jul 06 2025 at 12:14 UTC